您的位置:首页 > 运维架构

window.open

2013-07-22 18:12 232 查看
1,打开一个新窗口,并控制其样式

<html>
<head>
<script type="text/javascript">
function open_win()
{
window.open("http://www.w3school.com.cn","_blank","toolbar=yes, location=yes, directories=no, status=no, menubar=yes, scrollbars=yes, resizable=no, copyhistory=yes, width=400, height=400")
}
</script>
</head>

<body>
<form>
<input type="button" value="打开窗口" onclick="open_win()">
</form>
</body>

</html>


2,打开一个新的窗口

window.open(url,"_blank");

3,打开一个新窗口,并覆盖上次打开的

window.open(url,'newwindow');

4,在本窗口打开

window.open(url,'_self');
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: