title: call javascript function from hyperlink
body: <pre><code>function getValue()
  {
      alert(document.getElementById('user').value);
      return true
  }
  
  &lt;a href="my.html" onclick="return getvalue()"&gt;Go&lt;/a&gt;
  </code></pre>
  
  <p>When user click on hyperlink, before it redirect to <code>my.html</code>, it should invoke <code>getValue()</code> function, which will display username from textbox, whose id is <code>user</code>.</p>