This is the form
<form action="post" name="default_form">
<input type="hidden" value="d" name="def" />
<div id="load_result"></div>
</form>
But the following code doesn’t works in IE but properly works in mozilla,opera
var body = document.forms.default_form.serialize();
Any idea?
The
formelement does not have aserialize()method.It isn’t in the HTML5 spec either.
If you are talking about jQuery’s
serialize(), then you need to wrap the matched set with the jQuery object$(document.forms.default_form)or even$('form[name="default_form"]').