I have a text box for inputting comments and buttons for submitting using jQuerys .post() and JSON:
$('#submit').click(function () { var comment = {}; comment.Author = $("#author").val(); comment.Email = $("#email").val(); comment.WebSite = $("#url").val(); comment.Body = $("#comment").val();
But $("#comment").val() does not seem to store newline characters (input loses newline characters). How can I make this work?
jquery line-breaks textarea jquery-post
Ray fan
source share