Saturday, 23 April 2016

How to make a unclickable link ?


For a link, put hash # symbol as URL in href attribute, like :
<a href=#>Click me</a>

If you want make a link unclickable using JavaScript, find the element and set its href property to #
document.getElementById("myLink").href = "#";

No comments:

Post a Comment

Note: only a member of this blog may post a comment.