JS-showMoalDialog传参
function openWindow(driverName,id,dayOff,holidayType,sex){ var driver = new Object(); driver.id=id; driver.sex=sex; driver.driverName=driverName; driver.dayOff=dayOff; driver.holidayType=holidayType; window.showModalDialog( "main_company/sch.jsp", driver, "dialogWidth=750px;dialogHeight=150px;center=yes;border=thick;status=no;help=no;scrollbars=yes" ); //window.open ('main_company/sch.jsp?driverid='+id+"&holidayType="+holidayType+"&dayOff="+dayOff, 'newwindow', 'height=100, width=700, top=300, left=500, toolbar=no, menubar=no, scrollbars=no,resizable=yes,location=no, status=no') }
第2个页面接收参数
var driver = window.dialogArguments; //alert("id is"+obj.id); //alert("dayOff is "+obj.dayOff); //alert("holidayType is "+obj.holidayType); document.getElementById("driverName").innerText ='司机姓名:' +driver.driverName; document.getElementById("sex").innerText ='性别:' +driver.sex;