The following code doesn't works in IE but in opera and mozilla
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 = documen开发者_JAVA技巧t.forms.default_form.serialize();
Any idea?
The form
element does not have a serialize()
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"]')
.
精彩评论