Grabbing current value of form input text
This should be fairly straightforward but I'm having some unexpected trouble.
I have a form with an input:
- <input type="text" id="mysearchfield" value="search me">
...the value attribute 'search me' is what is displayed on default page load.
If I focus on the text field and type into it, "Hello World!"
How can I see that new value?
I've tried the obvious:
- $('#mysearchfield').val();
This just simply returns the ORIGINAL value of "search me" though.
How can I pick up the new value on the fly? It must be possible, no?
Thanks!