Small windows:
<script>
window.open("boxes.htm","","width=200,height=200");
</script>In boxes.htm, open normal windows:
<script>
window.open("");
</script>
<script>
window.open("boxes.htm","","width=200,height=200");
</script>In boxes.htm, open normal windows:
<script>
window.open("");
</script>
还有window.open的用法:
<Script language="javascript">
var w=400;
var h=300;
window.open('baseinfo/default.asp',"OAMAIN","fullscreen=0,toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=0,resizable=0,width=" + w + ",height=" + h + ",top=0,left=0",true);
objwin.focus();
</script>
In boxes.htm, open normal windows and close itself:
<script>
window.open("");
self.close();
</script>The follow is to maximize the window:
<body>
<input type=button onclick=checkBeforeMaximize() value=checkBeforeMaximize>
<OBJECT id=MaxShow type="application/x-oleobject" classid="clsid:adb880a6-d8ff-11cf-9377-00aa003b7a11">
<param name="Command" value="MAXIMIZE">
</object>
<script>
function checkBeforeMaximize(){
if(document.body.offsetWidth==window.screen.Width)
alert("已经最大化了");
else
MaxShow.Click();
}
</script>
</body>