title: Javascript for adding a custom attribute to some elements
body: <p>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.</p>
  <p>I have done this before using jQuery, but I'm unable to use it for this particular task.</p>