<div class="htmlarea"> <textarea id="runcode85729"> <img id="win" style="max-width:90%" src="http://www.jb51.net/upload/20080907101743898.jpg" alt="javascript实现的仿腾讯QQ窗口抖动效果代码_页面背景" > <button onclick="zd()">振动</button> <script> function zd(u){ var a=['top','left'],b=0; u=setInterval(function(){ document.getElementById('win').style[a[b%2]]=(b++)%4<2?0:4; if(b>15){clearInterval(u);b=0} },32) } </script> <a href="http://www.jb51.net/">欢迎访问脚本之家,www.jb51.net</a> </textarea><br><input onclick="runEx('runcode85729')" type="button" value="运行代码"> <input onclick="doCopy('runcode85729')" type="button" value="复制代码"> <input onclick="doSave(runcode85729)" type="button" value="保存代码">[Ctrl+A 全选 注:<a href="http://www.jb51.net/article/23421.htm" title="查看具体详情" target="_blank">如需引入外部Js需刷新才能执行</a>]</div>