如何使用鼠标移动图像?
如何在图像上使用
我该如何循环连续执行
抱歉,我忘记告诉您我的
onmousedown
和onmousemove
是正确处理事件的方法吗? <html>
<body>
<script type="text/javascript">
funcion good()
{
document.getElementById("omna");
document.getElementById("omna).style.position="absolute";
document.getElementById("omna").style.top=somevalue; 'these keeps changing
document.getElementById("omna").style.left=somevalue; ' these keeps changing
}
</script>
<img id="omna" src"/something.jpg" onmousedown="highlight() onmousemove="good()" onmousedown="stop()"> 'not working
</body>
</html>
如何在图像上使用
mousedown
事件?并且使用mousedown
事件(我的意思是在图像上使用mousedown
),它应该在JavaScript中不断运行mousemove
事件函数,并且当mouseup
事件发生时,它应该停止。我该如何循环连续执行
mousemove
事件?无法理解。我在Google上找到了一些解决方案,但无法弄清语法和其他问题。如果您能提供相同的解决方案,请解释一下您的解决方案。抱歉,我忘记告诉您我的
mousedown
和mousevents
不起作用。有些人建议使用锚标签,可以吗?为什么mouseevents
对于图像有效?