JavaScript change disabled attribute | Dynamically disabled it using JS code

Just set the disabled property to false in JavaScript, it will change the disabled attribute in HTML. If you set disabled property true then HTML elements will disable.

JavaScript change disabled attribute value example

HTML example code, it will disable a input button.

Output:

JavaScript change disabled attribute

Do comment if you have any doubts and suggestions on this topic.

Note: All JS Examples codes are tested on the Firefox browser and the Chrome browser.
OS: Windows 10
Code: HTML 5 Version


Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.