<html>
<head>
<title>系统导入中</title>
<script language="javascript">
function changeStyle(){
window.opener = null;
window.close();
if (window.screen.width>800)
window.open(' http://www.baidu.com','_blank','top=0,left=0,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=1024,height=768');
else
window.open(' http://www.baidu.com','_blank','top=0,left=0,status=yes,menubar=no,resizable=yes,scrollbars=yes');
}
</script>
</head>
<body>
<input type="button" value="改变" onclick="changeStyle()">
</body>
</html>
<head>
<title>系统导入中</title>
<script language="javascript">
function changeStyle(){
window.opener = null;
window.close();
if (window.screen.width>800)
window.open(' http://www.baidu.com','_blank','top=0,left=0,status=yes,menubar=no,scrollbars=yes,resizable=yes,width=1024,height=768');
else
window.open(' http://www.baidu.com','_blank','top=0,left=0,status=yes,menubar=no,resizable=yes,scrollbars=yes');
}
</script>
</head>
<body>
<input type="button" value="改变" onclick="changeStyle()">
</body>
</html>
本文介绍了一个系统导入过程中涉及的一个简单页面实例,该页面通过JavaScript实现了窗口样式的动态调整并打开新的窗口功能。此功能根据屏幕尺寸的不同来调整新窗口的大小。

1万+

被折叠的 条评论
为什么被折叠?



