title: jQuery anchor preventDefault
body: <p>Using jQuery, how do I get the value from a textbox and then load a new page based on the value?</p>
  
  <p>For example, lets say the textbox contains "hello" on page1.php, how do I change the default behavior of an anchor tag to now load the following</p>
  
  <p>page2.php?txt=hello</p>
  
  <p>I have the following so far:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $(document).ready(function(){
      $("a.mylink").click(function(event){
          alert("link clicked");
          event.preventDefault();
      });
  });
  &lt;/script&gt;
  </code></pre>