震动的链接
- <html>
- <head>
- <script type="text/javascript">
- function shakeleft()
- {
- document.getElementById('myLink').style.position="relative"
- document.getElementById('myLink').style.left="3"
- timer=setTimeout("shakeright()",10)
- }
- function shakeright()
- {
- document.getElementById('myLink').style.left="0"
- timer=setTimeout("shakeleft()",10)
- }
- function stoptimer()
- {
- clearTimeout(timer)
- }
- </script>
- </head>
-
- <body>
- <a id="myLink" href="http://www.jishuchi.com/"
- onmouseover="shakeleft()" onmouseout="stoptimer()">请把鼠标移动到链接上</a>
- </body>
-
- </html>