function DisableTheAnchorTag()
{
var btnA= document.getElementById("name of the a tag");
if(btnA!= null)
{
btnA.onmouseover=function y(){this.style.cursor='default'}
btnA.setAttribute('onclick', "void(0);");
}
}
ReplyDeleteThere are several ways to Disable the anchor element href . 3 Simple Methods of 'How to Disable Anchor Tag' in a Very Small Line of Code is given in the link below
http://techniblogic.com/how-to-disable-anchor-tag-href-links-by-html-css-javascript/
MUST CHECK
It is the simplest way i have founded to disable the anchor tag
Here you can get the latest method of How to disable Anchor Tag
ReplyDeleteHere