title: Select all textboxes in a document using Javascript?
body: <p>I would like to select all the contents of the text-boxes when a user clicks on it. But, since my document contains almost 5 text-boxes, instead of giving each text-box an ID selector or <code>onfocus</code> attribute, I would like to select all the text-boxes.</p>
  
  <p>For example: <code>var x = document.getElementsByTagName("p");</code></p>
  
  <p>The above code selects all the paragraphs in a document. So, I need a similar code for all textboxes. I have tried replacing <code>input</code> and <code>input[type=text]</code> Nothing worked.</p>