<script type="text/vbscript">
document.write "Screen resolution: " & window.screen.width & "X" & window.screen.height & "X" & window.screen.colorDepth & "bits"
document.write "<br>Available resolution: " & window.screen.availWidth & "X" & window.screen.availHeight
</script>
转换成 JavaScript 即可。要求:IE 4.0 以上版本。
document.write "Screen resolution: " & window.screen.width & "X" & window.screen.height & "X" & window.screen.colorDepth & "bits"
document.write "<br>Available resolution: " & window.screen.availWidth & "X" & window.screen.availHeight
</script>
转换成 JavaScript 即可。要求:IE 4.0 以上版本。
脚本说明:
第一步:把如下代码加入<head>区域中
<script language="JavaScript">
<!--
function win() {
var h= document.winfrm.hig.value
var w= document.winfrm.wid.value
testWindow=window.open("about:blank",'testwin','toolbar=no,location=no,directories=no,menubar=no,scrollbars=no,resizable=no,width=' + w + ',height=' + h +'');
testWindow.document.writeln("<head><title>测试窗口</title></head>");
testWindow.document.writeln("<body bgcolor=#ffffcc>");
testWindow.document.writeln("该窗口已经按照你要求的大小打开了!<p>");
testWindow.document.writeln("如何使用就在于你的创意了!别忘了你现在在<a href="http://winwa.myetang.com">鸿页飞弧</a></body>");
testWindow.document.writeln('');
}
// -->
</script>第二步:把如下代码加入<body>区域中
<form name="winfrm">
窗口宽度:
<input type="text" name="wid" maxlength="3">
<br>
窗口高度:
<input type="text" name="hig" maxlength="3">
<br>
<input type="button" name="s" value="开始测试" onClick="win()" class="yk9">
</form> 更详细且更多的请到http://winwa.myetang.com/ 查询!