window.location="aaa.aspx"
上面的方法只能在当前页打开,如果要在新的页面打开,最简单的是用以下方法
form.target="_blank";
form.action="aaa.aspx";
form.submit();
window.top.location=url 可以在iframe中的页面在父窗口刷新打开
window.open方法可控制的样式丰富,比如我们可以控制窗口显示的大小,窗口显示的内容,以及位置等等。都是使用js中的window.open有一个缺点就是容易被浏览器屏蔽。本文介绍了js中打开新窗口的各种方法。
1,打开新窗口全屏
复制代码 代码如下:
<html><head>
<title>blue</title>
<SCRIPT>
function ow(owurl){
var tmp=window.open("about:blank","","fullscreen=1")
tmp.moveTo(0,0);
tmp.resizeTo(screen.width+20,screen.height);
tmp.focus();
tmp.location=owurl;
}
</SCRIPT>
</head>
<body>
<ahref="javascript:ow('http:///','','width=790,height=590');
window.opener=null;
window.close();
</script>
