How to disable a html button on JavaScript onclick event ? I am using a input type="button"
<input type="button" class="standardbutton" value="Password Reset" id="mybutton" onclick=" passwordReset()"/>
Since I am not using jquery or any framework for the UI, how to disable it?
I tried to set disabled = true, but it didn't work.
For example:
document.getElementById("mybutton").disabled = true;
document.querySelector('#mybutton').disabled = truehow is that any more slower or complicated than fetchnig jQuery just to use itsattr()?