How to simulate anchor link click

前端 未结 6 653
渐次进展
渐次进展 2020-12-15 04:02

I\'m trying to trigger a link click for .jquery. Does someone know why the following doesn\'t work.



        
6条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-15 04:34

    This can be done without jQuery:

    document.querySelector('#google_link').click()
    

提交回复
热议问题