jquery - Typing in the value of an input doesn't change the .val() of the input? -


screenshot 1: unchanged:

screenshot 2: changed, yet .val() shows original :

.val() returns same thing, because in html, text inbetween <textarea> tags remains same.

<textarea id="suggested_text" name="suggested_text" style="width: 100%; height: 250px;">enter comment(s) click submit.</textarea> 

how behave normally? can retrieve value of typed in box?

you should use

$("#suggested_text").html() 

instead!

you may see live:

http://jsfiddle.net/z6rmb/

edit: realized on link above used .val(), worked fine me , html first proposed not!!!


Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -