How to disable right-click on a hyperlink in html

+1 vote
1,830 views
asked Dec 15, 2012 in HTML by john (4,220 points)
I need to disable right-click on a hyperlink which is in a span. I need to disable only one link from the whole page. Any suggestions?

1 Answer

0 votes
answered Dec 15, 2012 by kalpana (3,995 points)

 

if you dont want to show the context menu on hyperlink, you can do so without doing anything to other part or even span where it exists. I tested in IE, Firefox and it works.

<a href="#" oncontextmenu="return false;"> Link </a>
...