Loading ...

How to disable hyperlink/anchor click | CodeAsp.Net

How to disable hyperlink/anchor click

0 (0votes)

Today I was in a need where I needed to disable the click of some hyperlink. I didn't want that to do with external jQuery or JavaScript code. I wanted the logic to do the same via inline code only. I decided to go with setting javascript: void(0) as href tag for hyperlink. 

<a href="javascript: void(0)">Dare to click me!</a>

  Live demo: http://jsfiddle.net/raghav_khunger/epXbD/embedded/result/

Comments (no comments yet)

Top Posts