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