What does mean?

前端 未结 5 1988
生来不讨喜
生来不讨喜 2021-01-30 07:03

In my html page, I see a link whose \'view source\' code is as below :


I see a valid link when I hover my m

5条回答
  •  迷失自我
    2021-01-30 07:52

    Javascript may be hooking up to the click-event of the anchor, rather than injecting any href.

    For example, jQuery:

    $('a.view').click(function() { Alert('anchor without a href was clicked');});
    

    Of course, the javascript can do anything it wants with the click event--such as navigate to some other page (in which case the href is never set, but the anchor still behaves as though it were)

提交回复
热议问题