Disable or Enable HTML Element with JavaScript

Hi. I needed to make the HTML elements enabled or disable.

When I try with VanillaJS I wrote this code:

VanillaJS Way

JS Code

HTML Code

See VanillaJS Example https://jsfiddle.net/aligoren/pqa6xw51/

jQuery Way

You can also use jQuery. This code is very basic:

JS Code

HTML Code

See jQuery Example https://jsfiddle.net/aligoren/n14pzh5g/

AngularJS Way

See Example https://jsfiddle.net/aligoren/6nby94kj/