I'm using (form).serialize to POST a form with ajax...
Something l开发者_JAVA百科ike:
$.post("/ajax/post_message_action.php", $(form).serialize(), function (data) { ... }
The problem is that I want to use a contentEditable DIV instead of a
<textarea name="description">
Is this possible?
Thanks!
$.post("/ajax/post_message_action.php",
$(form).serialize()+"&description="+$('div[name=description]').text() ,
function (data) { ... });
a. keep a hidden textarea
element in the form.
b. on form submit, set the innerHTML of the div as the text in the textarea.
精彩评论