JQuery: .val() is not working for textarea
问题 I am trying to read the content of a textarea, but .val() does not work for my textarea. I would be happy, if someone has a solution for me. Here's my code: HTML: <textarea id="details" class="required" rows="5"></textarea> JS: $.ajax({ type: "GET", url: "reserve.php", data: { details : $('#details').val(), ... }, ... }); Thank you! 回答1: val() works just fine... You must have your error elsewhere. Example Probably your selector in not matching. Check for typos and if you applied the correct