+ 2
How to disable anchor tag(<a>) with Javascript using Tag name attribute (so that link return nothing)
2 Answers
+ 1
Following code may help you
JavaScript
if (condition) { document.getElementsByTagName('a')[0].removeAttribute('href'); }
and if you are using
jQuery
if (condition) { $('a').first().removeAttr('href'); }
0
Not possible