2007-12-19
窗口的弹出 window.open showModalDialog
父页面:
跳出的页面
function setChannel(){
var sID=document.getElementById("txtSID").value;
if(navigator.appName=="Netscape"){
window.open("vip_w.jsp?sID="+sID,"","top=50,left=300,modal=yes,width=500,height=600,resizable=no,scrollbars=yes");
}
else{
var sReturnValue=showModalDialog("vip_w.jsp?sID="+sID,"","dialogTop:50px;dialogLeft:300px;dialogWidth:500px;dialogHeight:600px");
}
}
跳出的页面
var sOldUrl="";
if(navigator.appName=="Netscape"){
sOldUrl=window.opener.location;
}
function setValue(){
if(navigator.appName=="Netscape"){
var slocation=window.opener.location;
if(slocation==sOldUrl){
window.opener.document.getElementById("txtSID").value=sChannleValue;
}
top.close();
}else{
window.returnValue=sChannleValue;
window.close();
}
}
}
function closeWindow(){
if(navigator.appName=="Netscape"){
top.close();
}else{
window.close();
}
}
- 16:17
- 浏览 (198)
- 评论 (0)
- 分类: javascript
- 相关推荐







评论排行榜