父页面:
[code]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");
}
}
[/code]
跳出的页面
[code] 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();
}
}[/code]
[code]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");
}
}
[/code]
跳出的页面
[code] 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();
}
}[/code]