Get value from form text box

I have the following line of code on my page.

<input type=“text” size=“1” name=“CartQty”>

Its not inside form tag.
On clicking a link, i want to get the value of “CartQty” and pass it as query string. I dont want to use a button for that reason.
How can i get the value of “CartQty”?? Is it possible to do so???