title: javascript - How do I make onclick"window.location" also work when user opens in new window
body: <p>To hide the true destination of a link I'm using the following code:</p>
  
  <pre><code>&lt;a href="http://example.com" onclick="window.location='http://url-i-want-to-hit.com/'; return false;"&gt;Click me&lt;/a&gt;
  </code></pre>
  
  <p>However, if I do right-click and then open in new window, it goes to the url specified in the anchor href tag. I want it to go to the url specified in the javascript.</p>
  
  <p>Is there a way to do this?</p>
  
  <p>Thanks in advance</p>