How to simulate a mouse click using JavaScript?

后端 未结 7 1080
无人及你
无人及你 2020-11-22 00:57

I know about the document.form.button.click() method. However, I\'d like to know how to simulate the onclick event.

I found this code somew

7条回答
  •  感情败类
    2020-11-22 01:53

    You can use elementFromPoint:

    document.elementFromPoint(x, y);
    

    supported in all browsers: https://caniuse.com/#feat=element-from-point

提交回复
热议问题