eval函数与showModalDialog的结合使用
function doddkm() { var ran = Math.random(); var loan_id = document.all.LOAN_ID.value; var arr = window.showModalDialog("..src"); if ( arr != null && arr.length > 0){ document.all.LOAN_ID.value = arr[0]; } }
在子窗口操作,返回一个array,写出这样也可以
function doddkm() { var ran = Math.random(); var loan_id = document.all.LOAN_ID.value; var arr = eval(window.showModalDialog("..scr ")); if ( arr != null && arr.length > 0){ document.all.LOAN_ID.value = arr[0]; } }