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> <select id="mySelect"> <option>Cats</option> <option>Dogs</option> </select> </form> <p>Click the button to disable the dropdown list.</p> <button onclick="myFunction()">Try it</button> <script> function myFunction() { document.getElementById("mySelect").disabled = true; } </script> </body> </html>