title: Javascript Clicking Multiple Links
body: <p>I have a webpage page full of links, with check boxes next to them showing that I've clicked them. There are hundreds of links, and I would rather not click through all of them. What I would like to do is write a script that performs a "click" on each of the links, so that I don't have to. </p>
  
  <pre><code>var links = document.getElementsByClassName("some-class");
  
  for(var i = 0; i &lt; links.length; i++) {
     links[i].click();
  }
  </code></pre>
  
  <p>My code simply opens the first link and navigates away from the original page, which of course stops execution of the code. </p>
  
  <p>Can Javascript open links without navigating to them, such as in a new window or tab? If not, with what language can this be scripted? </p>