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:
edit: realized on link above used .val(), worked fine me , html first proposed not!!!
Comments
Post a Comment