Javascript examples for DOM HTML Element:Input Month
Input Month disabled Property - Disable and enable a month field:
<!DOCTYPE html> <html> <body> <input type="month" id="myMonth"><br><br> <button onclick="disableBtn()">Disable Month Field</button> <button onclick="enableBtn()">Enable Month Field</button> <script> function disableBtn() {//from w w w . ja v a 2 s.c o m document.getElementById("myMonth").disabled = true; } function enableBtn() { document.getElementById("myMonth").disabled = false; } </script> </body> </html>