title: javascript get element's tag
body: <p>Lets say this is my HTML:</p>
  
  <pre><code>&lt;div id="foo"&gt;
  &lt;input id="goo" value="text" /&gt;
  &lt;span id="boo"&gt;
  &lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I would like to be able to determine what tag belongs to a html element. </p>
  
  <p>Example element with id "foo" = <code>div</code>, "goo" = <code>input</code>, "boo" = <code>span</code> ...</p>
  
  <p>So something like this:</p>
  
  <pre><code>function getTag (id) {
     var element = document.getElementById(id);
     return element.tag;
  }
  </code></pre>