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個頁面接收參數javascript

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;
相關文章
相關標籤/搜索