【发布时间】:2026-01-24 18:40:02
【问题描述】:
我只是想问一下触摸屏移动设备在部署时是否支持 onmouseup 和 onmousedown 事件。
我这里有这段代码:
<img src="images/plus.png" id="+" onclick=compare(this.id) onmousedown=changeplus() onmouseup=changeplus2() class=plus_button style="width:100px; height:100px;">
我不确定设备是否支持这些。
我无法测试它,因为我还没有设备。 如果不是,那有什么替代方法吗?
提前致谢。
【问题讨论】:
-
不要使用突兀的事件处理程序!