<html>
<head>
<title>pege1</title>
<script>
function OpenWindow(url, w, h) {
var left = Math.round((window.screen.availWidth - w) / 2);
var top = Math.round((window.screen.availHeight - 100 - h) / 2);
var MyWin = window.open(url, "", "height=" + h + ", width=" + w + ",top=" + top + ",left=" + left + ", toolbar=no, menubar=no, scrollbars=no, resizable=no, location=no, status=no");
}
</script>
</head>
<body>
测试页面。点击下面按钮试试看吧。<br />
<input type="button" value="测试" onclick="OpenWindow('index.html',600,100)">
</body>
</html>
web弹出新建窗口
最新推荐文章于 2024-06-07 11:38:13 发布