js打开新窗口方法整理(2)


<html>
<head>
<meta http-equiv="Content-Type" content="text/html;charset=gb2312">
<title>js打开新窗口方法代码收集 - 中国asp之家 -</title>
<link href="https://www.jb51.net/index.css"type="text/css">
<script language="JavaScript"type="text/JavaScript">
<!--
function MachakFull(Ie,other){
x=screen.availWidth;
y=screen.availHeight;
target =parseFloat(navigator.appVersion.substring(navigator.appVersion.indexOf('.')-1,navigator.appVersion.length));
if((navigator.appVersion.indexOf("Mac")!=-1)&&(navigator.userAgent.indexOf("MSIE")!=-1)&&(parseInt(navigator.appVersion)==4))
window.open(other,"sub",'scrollbars=yes');
if (target >= 4){
if (navigator.appName=="Netscape"){
varMachakFull=window.open(other,"MachakFull",'scrollbars=yes','width='+x+',height='+y+',top=0,left=0');
MachakFull.moveTo(0,0);
MachakFull.resizeTo(x,y);}
if (navigator.appName=="Microsoft Internet Explorer")
window.open(Ie,"MachakFull","fullscreen=yes");
}
else window.open(other,"sub",'scrollbars=yes');
}

function MM_goToURL() { //v3.0
var i, args=MM_goToURL.arguments; document.MM_returnValue =false;
for (i=0; i<(args.length-1); i+=2)eval_r(args[i]+".location='"+args[i+1]+"'");
}
//-->
</script>
</head>

<body bgcolor="#3366CC" SCROLL=NOonload="MachakFull('/bbs/','')">

----------------------------------------------------------------------------------------------

<script>
window.open('https://www.jb51.net/','','fullscreen=1');
window.close();
</script>


7,网页对话框

复制代码 代码如下:


<script>
window.onload=function(){
varfeatures='status:0;dialogWidth:470px;dialogHeight:470px;dialogTop:100px;dialogLeft:100px;resizable:0;scroll:0;center:1';
showModelessDialog("http://www.aspxhome/",window,features);
}
function show(laysn)
{
var obj;
obj=laysn.style;
obj.visibility='visible';
}
function hidden(laysn)
{
var obj;
obj=laysn.style;
obj.visibility='hidden';
}
</script>


8,子窗口打开,关闭父窗口

复制代码 代码如下:


<script>
window.open('http://www.aspxhome.com/','','width=790,height=590');
window.opener=null;
window.close();
</script>

您可能感兴趣的文章:

内容版权声明:除非注明,否则皆为本站原创文章。

转载注明出处:https://www.heiqu.com/wdyfss.html