Uncaught TypeError: xxx.submit is not a function解决方案

    问题详情:

    后端的程序写的都没有问题。在点击button的时候会出现错误

    Uncaught TypeError: targetForm.submit is not a function
        at login ((index):11)
        at HTMLInputElement.onclick ((index):26)

    解决方案:把jsp中的<input>组件的名字改成其他的,但不要是submit。

    还遇到过一个问题,就是把οnclick=“register();”的时候程序也会出现同样的问题,把register换成其他字母即可。

转载于:https://my.oschina.net/u/3008297/blog/823244