0

Does anyone know how to select a value from a textbox/dropdown/checkbox within a form.

So if my form has an ID of "frm_1" and there is a textbox with ID "txt" how can I get that value using super JQuery?

I've tried a number of things but nothing lovely comes out. Here is the link, I'm just in design stage so please excuse the silly IDs! :O

http://pastebin.com/wbyL7qPt

Merry Christmas all!

1 Answer 1

3

You could use the .val() function:

var value = $('#txt').val();
Sign up to request clarification or add additional context in comments.

2 Comments

that does work but I need the value fo the textbox within the form
@LooDaFunk, as long as your textbox has an unique ID there's no problem. Just use this unique id and you will get to the required value. Remember that IDs should be unique within the whole HTML document.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.