title: get element by tag name [this]?
body: <p>First a short background. So I just started practicing using API's. With the one I'm working with right now, I'm loading a DIV which have alot of links in it which I have to give a new purpose. I managed to prevent the default onclick-function. Now I need do save the clicked link "innerHTML" attribute.</p>
  
  <pre><code>var nextPage = document.getElementsByTagName("a")[this].innerHTML;
  </code></pre>
  
  <p>with [this] I tried to target the clicked link, but it didn't work. Hopefully you understands what I'm trying to do. If so, is there any way I an solve this problem? </p>
  
  <p>Thanks! </p>
  
  <p>EDIT:</p>
  
  <pre><code>     $("#content, a").click(function(event){
   event.preventDefault();
  
       var x = document.getElementsByTagName("a")[0].innerHTML;
      console.log(x)
  
  
  
   getPage(x);
   });
  </code></pre>