title: pure javascript equivalent of jquery click()?
body: <p>I am building a small app which captures mouse clicks. I wrote the prototype in jquery but, since it is a small app focusing on speed, embedding jquery to use just one function would be an overkill.  </p>
  
  <p>I tried to adapt this example from <a href="http://www.javascriptkit.com/jsref/eventkeyboardmouse.shtml" rel="noreferrer">JavascriptKit</a>:  </p>
  
  <pre><code>document.getElementById("alphanumeric").onkeypress=function(e){  
      //blah..blah..blah..  
  }
  </code></pre>
  
  <p>but it didn't work when I tried  </p>
  
  <pre><code>document.getElementsByTagName("x").onclick
  </code></pre>
  
  <p>What am I doing wrong?</p>