开发者

Serialize() not working in Internet Explorer

This works fine in FF, Chrome, Safari, but not in IE8

var z = $($('form')[0].elements).not("#x, #y").serialize();

Field names and values of 'x' and 'y' are omitted from the serialize() output string.

ID and name attributes are the same for each element, name="x", id="x" for one, name="y", id="y" for the other.

But in IE the serialized form data always returns the name and value for element id="x" and id="y", which I need to excl开发者_JS百科ude as part of the form validation.

Is this a known bug in IE? I can find no specific solution to this problem online.

Thanks in advance


Ok, it seems the following works:

$('form :input:not(#x, #y)').serialize();
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜