超链接 标记 禁用,a href enable,How to make href enabled and disabled???enable/disable hyperlinks

Question:

Hello Everybody!!!

I need to make a  link diabled initially and enable it on clicking a radio button. Iam new to this.Need help.

Thanks.


answer this question
   

var alink;
function disableLink()
{

    alink = event.srcElement ? event.srcElement : event.target;
    alink.href = "javascript:void(0);";   
    alink.onclick = function(){return false;};
    alink.style.color = "#999999";
    alink.style.cursor = "text";
}

function enableLink()
{
    alink.href = "javascript:void(0);";   
            alink.onclick = function(){return true;};
            alink.style.color = "";
            alink.style.cursor = "hand";
}


你可能感兴趣的:(disabled)