移动的图像
- <html>
- <head>
- <script type="text/javascript">
- var i=1
- function starttimer()
- {
- document.getElementById('myimage').style.position="relative"
- document.getElementById('myimage').style.left=+i
- i++
- timer=setTimeout("starttimer()",10)
- }
- function stoptimer()
- {
- clearTimeout(timer)
- }
- </script>
- </head>
- <body onload="starttimer()" onunload="stoptimer()">
- <img id="myimage" src="/i/eg_smile.gif" />
- </body>
- </html>