Simulating a click in jQuery/JavaScript on a link

后端 未结 7 1519
野趣味
野趣味 2020-12-01 04:45

I want to simulate a click on any link on a page using JavaScript. If that link has some function binded to its \'onclick\' event (by any other JS I don\'t have any control

相关标签:
7条回答
  • Easy! Just use jQuery's click function:

    $("#theElement").click();
    
    0 讨论(0)
提交回复
热议问题