开发者

getting value from hidden textarea with jquery

I would l开发者_高级运维ike to know how to retrieve the value of a textarea box that was initially hidden but when a checkbox is ticked it reveals the textbox for input. I have posted my code here:

http://jsfiddle.net/RF5PK/

many thanks


Generally, using val():

$('textarea[name="setmessage"]').val();

Here's a demo.

Although, from the code sample, I get the impression there's more to this question than meets the eye!


Try this

$('textarea[name="setmessage"]').val();


http://jsfiddle.net/RF5PK/4/ see this i have only used needed jquery for your question. And I have added contactmessage class to your text area.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜