JS控件图片移动,无非常是setInterval,setTimeout来控件图片的位置,
示例代码:
<img src="a.jpg" style="position:absolutetop:0pxleft:40%" id="movpic">
<script>
var obj = document.getElementById("movpic")
var tops=0
function movs1()
{tops+=5<br/>obj.style.top = tops<br/>}
setInterval('movs1()',500)
</script>
JS文件:
function show(){var imgid=document.getElementById("imgid")
if(imgid.style.visibility == "visible")
imgid.style.visibility = "hidden"
else
imgid.style.visibility = "visible"
setTimeout('show()',300)
}
HTML:
<img id="imgid" style="visibility:visible" src="1.jpg" />
<button onclick="show()">按下图片会闪动</button>
不知道你是不是这个意思 发现有点没读懂你想要的东西