Javascript examples for DOM HTML Element:Input Email field
Input Email disabled Property - Disable and enable an email field:
<!DOCTYPE html> <html> <body> E-mail: <input type="email" id="myEmail"><br><br> <button onclick="disableBtn()">Disable Email Field</button> <button onclick="enableBtn()">Enable Email Field</button> <script> function disableBtn() {/*from ww w . j av a2 s .c o m*/ document.getElementById("myEmail").disabled = true; } function enableBtn() { document.getElementById("myEmail").disabled = false; } </script> </body> </html>