窗口的弹出 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();
        }
    }


你可能感兴趣的:(jsp)