I am using a fairly standard technique to create a button on my page using an anchor tag.
Specifically:
<a href="#" id="downloadBtn" onclick="doSomething()"><span style="margin-left:17px;">Download</span></a>
Initially I want to disable this button. But because I implement it as an anchor tag, I don’t know how to do this. As a regular Input button, I would just add the attribute disabled=true, but what do I do here?
Thank you for your help.
Elliott
Initially, set
onclick="return false", then use your script to change the value ofonclickwhen the time comes.You could also add a class to the anchor, then use CSS to style the link so that it does not look like a link. Then remove that class from the element at the same time that you change the value of
onclick.