error:Uncaught TypeError:documen.getElementById(...).submit() is not a function
solution:Make sure that there is no name=‘submit’ or id=‘submit’ in the form.When you name the button submit, you override the submit() function.
调用from标签的submit()功能报错,查下来发现是因为有命名为submit的id
把id改成其他名称之后恢复正常。
查资料发现,form表单内存在名为“submit”的name或者id,会重写submit()方法,导致报错。
通常,命名应尽量避免使用关键字。
documen.getElementById(...).submit() is not a function
最新推荐文章于 2024-04-28 13:46:58 发布