Given a section of HTML, can I selectively pick some types of elements (ex: input type) and add a custom attribute using Javascript. I would also need to remove this attribute if it exists.
I have done this earlier using JQuery but am unable to use JQuery for this particular task.