title: How to open new tab using onclick="javascript:location.href"?
body: <p>I'm trying to figure out if there's a way to open a new tab using "<strong>javascript:location.href</strong>". I can't use other methods to open the link because it needs to get the ID of a certain member of my website when it loads. I also can't make a javascript function because I have more than one link to open.</p>
  
  <pre><code>target="_blank" //didn't work
  </code></pre>
  
  <p>Here's a piece of my code:</p>
  
  <pre><code>&lt;a onclick="javascript:location.href='website.com' + location.search"&gt;&lt;a/&gt;
  </code></pre>
  
  <p>If there are other ways to do this, please let me know.</p>