How to simulate a mouse click using JavaScript?

后端 未结 7 1098
无人及你
无人及你 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:44

    From the Mozilla Developer Network (MDN) documentation, HTMLElement.click() is what you're looking for. You can find out more events here.

提交回复
热议问题