Javascript examples for DOM HTML Element:Input Button
Input Button disabled Property - Disable and enable a button:
<!DOCTYPE html> <html> <body> <input type="button" id="myBtn" value="My Button"> <br> <button onclick="disableBtn()">Disable "My Button"</button> <button onclick="undisableBtn()">Enable "My Button"</button> <script> function disableBtn() {/* www .ja v a 2 s . c om*/ document.getElementById("myBtn").disabled = true; } function undisableBtn() { document.getElementById("myBtn").disabled = false; } </script> </body> </html>