Run ❯
Get your
own
website
Result Size:
625 x 565
×
Change Orientation
Save Code
Change Theme, Dark/Light
Go to Spaces
<!DOCTYPE html> <html> <body> <form> Username: <input type="text" id="usrname"><br> Password: <input type="password" id="myPsw"> </form><br> <button onclick="disablePsw()">Disable Password field</button> <button onclick="undisablePsw()">Undisable Password field</button> <script> function disablePsw() { document.getElementById("myPsw").disabled = true; } function undisablePsw() { document.getElementById("myPsw").disabled = false; } </script> </body> </html>