如何模擬鼠標向下並隨後在aspx頁面的畫布hmtl5部分上進行鼠標向上事件?模擬鼠標在畫布上向下和向上html5頁面
我在網上搜索,發現這個......但我不能將它關聯到我的畫布html5元素,任何人都可以幫忙嗎?
dispatchMouseEvent(element, 'mouseover', true, true);
dispatchMouseEvent(element, 'mousedown', true, true);
dispatchMouseEvent(element, 'click', true, true);
dispatchMouseEvent(element, 'mouseup', true, true);
您可能會發現[this](http://stackoverflow.com/a/4176116/2264512)之一。請閱讀完整的答案。 'dispatchMouseEvent'是這裏用戶定義的函數。 –