我有一个代码只能在onclick事件后执行。在移动设备上它很好,因为我使用了touchstart和touchend。是否有类似于在电脑上使用触摸屏的事件?onclick结束了吗?
我的代码目前类似于..
document.getElementById('trigger-box').addEventListener(function(e) {
// the event will be used later
// my code
});
我试图寻找答案互联网可惜未能找到答案。因此,我在这里发布了我的问题。
也许onmouseup? –
@FabrizioMazzoni,的确是这样的答案。 –
我会说[Onmousedown](http://www.w3schools.com/jsref/event_onmousedown.asp)。 –