提交上传表单时,会出现警告:错误:表单元素不得命名为“submit”。
不,我没有任何名为 的表单元素提交
。我使用的是 jQuery 版本 1.3.2。
这个问题有什么解决办法吗?
最佳答案
我刚刚看到这个问题。它位于 jquery.form.js 文件的第 54 行,内容为
$(':input[@name=submit]', form).length
来自API/1.3/Selectors ,它说的是
Note: In jQuery 1.3 [@attr] style selectors were removed (they were previously deprecated in jQuery 1.2). Simply remove the '@' symbol from your selectors in order to make them work again.
当我将 jQuery 版本从 1.2 替换为 1.3 时,我可能遇到了这个问题。现在,我要么必须修改该行,要么替换我的 jquery.form.js 版本。
关于jquery - 错误: Form elements must not be named "submit",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1205110/