title: html: execute function when link clicked, get alert and then redirect to another page
body: <p>What's the best way to combine two strings</p>
  
  <p>String 1:</p>
  
  <pre><code>&lt;a href="javascript:myFunc();" onclick="alert('myFunc executed')"&gt;Click here&lt;/a&gt;
  </code></pre>
  
  <p>and
  String 2:</p>
  
  <pre><code>&lt;a href="http://google.com"&gt;click here&lt;/a&gt;
  </code></pre>
  
  <p>so that:
  myFunc() executed;
  alert appears;
  once alert is clicked, the page is being redirected to <code>http://google.com</code></p>
  
  <p>I'm asking about the most correct way to do that.</p>
  
  <p>Thank you.</p>