jQuery表单submit()在IE6中不起作用? [英] jQuery form submit() is not working in IE6?
问题描述
我想用下面的jquery提交一个;
$(#formid)。submit();
它在除IE6以外的所有浏览器中都能很好地工作。
如何使它在IE6中工作?
您可能有一个<输入name =submit/>
在表单中的某个地方,它覆盖IE中表单的函数submit。
编辑:
我在其他一些浏览器中测试过。所有主流浏览器的最新版本似乎都受到此问题的影响。
$ b
- IE - 所有版本
- Firefox 4 +
- 至少从版本12开始Chrome至少自$ 11版本开始至少有
-
底线:不要将您的输入命名为submit或表单元素的任何其他默认属性或方法(例如action或reset)。请参阅 MDC 以获得完整的概述。
I want to submit a with using jquery as below;
$("#formid").submit();
Its working perfect in all browsers except IE6.
How to make it work in IE6 ??
You probably have an <input name="submit" />
somewhere in your form, which overwrites the function "submit" of the form in IE.
Edit:
I have tested in some other browsers. The latest versions of all major browsers seem to be affected by this issue.
- IE - all versions
- Firefox 4+
- Chrome at least since version 12
- Opera at least since version 11
Bottom line: Never name your inputs "submit", or any other default property or method of the form element (e.g. "action" or "reset") . See MDC for a complete overview.
这篇关于jQuery表单submit()在IE6中不起作用?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!