Simulating a click in jQuery/JavaScript on a link

后端 未结 7 1589
野趣味
野趣味 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条回答
  •  被撕碎了的回忆
    2020-12-01 05:29

    All this might not help say when you use rails remote form button to simulate click to. I tried to port nice event simulation from prototype here: my snippets. Just did it and it works for me.

提交回复
热议问题