title: what is the difference between getelementsbytagname and getelementsbyname in javascript
body: <p>I recently came across these two methods for dom elements retrieval in a douglas crockford presentation but couldn't understand the difference between these two.</p>
  
  <pre><code>document.getElementsByTagName()
  
  document.getElementsByName()
  </code></pre>
  
  <p>can someone please explain it to me.</p>
  
  <p>the link to the video is <a href="http://www.youtube.com/watch?v=Fv9qT9joc0M" rel="noreferrer">http://www.youtube.com/watch?v=Fv9qT9joc0M</a></p>