Getting the textbox value

Getting the textbox value

Hello, I have this code. I want to get the value of textbox, I will set up the "code" that will need to put to textbox and based on the input they will redirect to their respective url.

<script type="text/javascript" src="jquery-1.3.2.min.js"></script>
<input id="code" name="code" type="text" placeholder="Input company code" />

<button id="btnSub" name="Submit">Submit</button>

<script type="text/javascript">
 $("button:#btnSub").click(function () {
 var codeval = $('#code').val();

if (codeval == "Comp1" || "comp1");
 location.href = ' http://localhost/estore/france/';

});

</script>