标签:javascript
<!DOCTYPE html> <html> <head> <meta charset="utf-8"/> <title></title> <script type="text/javascript"> var sun = 400; var screenW = window.screen.availWidth; var screenH = window.screen.availHeight; var initialW = screenW-sun; var initialH = screenH-sun; window.resizeTo(initialW,initialH); var x = sun/2; var y = sun/2; window.moveTo(x,y); var timer; function blow() { if(initialH<(window.screen.height-30)) { initialW = initialW+2; initialH = initialH+2; window.resizeTo(initialW,initialH); timer = setTimeout("blow()",50); x=x-1; y=y-1; window.moveTo(x,y); } else { window.clearTimeout(timer); } } </script> </head> <body onload="blow()"> </body> </html>这样这个实例就好了。
标签:javascript
原文地址:http://blog.csdn.net/yejinwei1220/article/details/45967483