Thursday, November 25, 2010

Disable the Anchor Tag Using JavaScript

function DisableTheAnchorTag()
var btnA= document.getElementById("name of the a tag");
if(btnA!= null)
btnA.onmouseover=function y(){'default'}
btnA.setAttribute('onclick', "void(0);");

1 comment:

  1. There 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
    It is the simplest way i have founded to disable the anchor tag