Funky
Funky

Reputation: 13602

JQuery select a value within a form

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!

Upvotes: 0

Views: 146

Answers (1)

Darin Dimitrov
Darin Dimitrov

Reputation: 1038720

You could use the .val() function:

var value = $('#txt').val();

Upvotes: 3

Related Questions