效果
代码
1234567891011 | <img src="http://s1.vevb.com/20150728/ksnu2b0kcol36.jpg" onMouSEOver="shake(this,'onmouseout')" ><script type="text/javascript">var typ = ["marginTop","marginLeft"],rangeN=10,timeout=20;function shake(o,end){var range=Math.floor(Math.random()*rangeN);var typN=Math.floor(Math.random()*typ.length);o["style"][typ[typN]]=""+range+"px";var shakeTimer=setTimeout(function(){shake(o,end)},timeout);o[end]=function(){clearTimeout(shakeTimer)};}</script> |
新闻热点
疑难解答