开发者

Disable anchor link failed with javascript

I have anchor tag

<a id="click" href="javascript:void(0);" onclick="disable();" style="">Clickme</a>.

When html loads it showing clickme,when i click anchor link,it calls disable() function,In disable function i am trying to hide it using below code:

document.getElementById("click").style.display='none';

But page never hides that anchor link,Please let me know if i am doing anything wrong.

Thanks in adv开发者_JAVA技巧ance.


I'm not sure if a link can be hidden (without being wrapped in a div) but if it could the code would be

document.getElementById("click").style.visibility='hidden'
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜