Using jQuery, how do I get the value from a textbox and then load a new page based on the value?
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
page2.php?txt=hello
I have the following so far:
<script type="text/javascript">
$(document).ready(function(){
$("a.mylink").click(function(event){
alert("link clicked");
event.preventDefault();
});
});
</script>
Html
Javascript