Nouvelle formation ! Tous les codeurs devraient apprendre l'IA générative !
Essayez une leçon gratuite+ 2
How to disable anchor tag(<a>) with Javascript using Tag name attribute (so that link return nothing)
2 Réponses
+ 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