Javascript for adding a custom attribute to some elements
<p>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.</p>

<p>I have done this earlier using JQuery but am unable to use JQuery for this particular task.</p>
