利用屏幕对象把网页窗口逐渐变宽的问题(高不变)
<html><body>
<script>
var x=10;
var y=window.screen.availHeight;
var dx=5;
var newFrm=window.open("","newForm","menubar=0,toolbar=0");
newFrm.resizeTo(x,y);
var intervalID=window.setInterval("active()",100);
function active()
{
if(newFrm.closed)
{
clearInterval(intervalID);
return;
}
if(x<screen.availWidth)
x+=dx;
else
{
clearInterval(intervalID);
}
newFrm.resizeTo(x,y);
}
</script>
<input type="button" value="stop" onclick="clearInterval(intervalID);newFrm.close();">
</body>
</html>