title: Detect the opening of a new tab with "ctrl+click"
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/4235426/how-can-i-capture-the-right-click-event-in-javascript">How can I capture the right-click event in JavaScript?</a>  </p>
  </blockquote>
  
  
  
  <p>I have links that, when clicked, execute some javascript code. Just like this:</p>
  
  <pre><code>&lt;script&gt;
          function myFunction(){
              alert("Hello World!");
          }
  &lt;/script&gt;
  
  &lt;a href="http://google.com" onclick="myFunction()"&gt;Click&lt;/a&gt;
  </code></pre>
  
  <p>When I do "Right click -> Open in a new tab" it directs me to 'google.com' without calling <code>myFunction()</code>. And that's exactly what I want.</p>
  
  <p>The problem shows up when I open the link in new tab by pressing the link "Ctrl+Left click". This way, it executes <code>myFunction()</code> and then goes to google.com.</p>
  
  <p>Is there any way to fix this?</p>