How to get the value of a textarea in jQuery
All Answers
total answers (1)
Severity: 8192
Message: str_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated
Filename: libraries/Filtered_db.php
Line Number: 23
total answers (1)
Use the jQuery
val()
methodYou can use the jQuery
val()
method to get or set the value of a<textarea>
element. Be sure to remove any trailing and leading whitespace, otherwise it may cause unexpected results.The following example will get the value from the textarea and show you in an alert dialog box on click of the button when it is not equal
need an explanation for this answer? contact us directly to get an explanation for this answer""
(i.e. not empty).