re-firing a click event on a link with jQuery

前端 未结 2 1977
广开言路
广开言路 2020-12-07 05:08

i\'ve got a page (asp.net) where I trap the click event of a link. i then do some dirty checking and present a dialog to the user,

$(function() {
    var c         


        
2条回答
  •  南笙
    南笙 (楼主)
    2020-12-07 05:41

    .click() only fires the event handlers for onclick, it doesn't actually make the default action of following the link happen. Probably the quickest method is just to do that manually:

    window.location= clickedLink.href;
    

    PS. “lose”

提交回复
热议问题