当前位置:首页 > 设计在线 > 网页设计 > Dhtml > javascript实现的仿腾讯QQ窗口抖动效果代码

javascript实现的仿腾讯QQ窗口抖动效果代码

点击次数:49 次 发布日期:2009-01-03 22:16:09 作者:源代码网
源代码网推荐 <img id="win" style="position:relative" src="http://www.jb51.net/upload/20080907101743898.jpg">
<button onclick="zd()">振动</button>
<script >
function zd(u){
var a=["top","left"],b=0;
u=xywInterval(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> 本文作者:未知
源代码网供稿.
网友评论 (0)
会员中心
设计在线
本站推荐
设计在线之精华