Given a section of HTML, can I selectively pick some types of elements (e.g., input) and add a custom attribute using JavaScript? I would also need to remove this attribute if it exists.
I have done this before using jQuery, but I'm unable to use it for this particular task.