JS 震动窗口

2012-03-07 16:55:10

[html] <img id=&#34;win&#34; style=&#39;position:relative&#39; src=&#34;skins/weisay_mono/UBB/Icons/flash.gif&#34;> <input type=&#34;button&#34; onclick=&#34;zd()&#34; value=&#34; 振动 &#34; /> <script type=&#34;text/javascript&#34;> function zd(u){ var a=[&#39;top&#39;,&#39;left&#39;],b=0; u=setInterval(function(){ document.getElementById(&#39;win&#39;).style[a[b%2]]=(b++)%4<2?0:4; if(b>15){clearInterval(u);b=0} },32) } </script> [/html] document.getElementById(&#39;win&#39;).style[a[b%2]]=(b++)%4<2?0:4; 很精简嘛... 找不到&#34;窗口&#34;图片, 用Flash图片代替吧....呃...