震动的超链

<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.w3schools.com/"
onmouseover="shakeleft()" onmouseout="stoptimer()">Mouse over this link</a>
</body>

</html>

posted @ 2008-10-09 11:50  itecho  阅读(114)  评论(0编辑  收藏  举报