Heim > Fragen und Antworten > Hauptteil
HTML页面上有个ID='loginform'
的form表单,为什么我在chrome的右键控制台上写document.getElementById('loginform').submit();
结果报错了
Uncaught TypeError: document.forms.loginform.submit is not a function
at <anonymous>:2:29
at Object.InjectedScript._evaluateOn (<anonymous>:905:140)
at Object.InjectedScript._evaluateAndWrap (<anonymous>:838:34)
at Object.InjectedScript.evaluate (<anonymous>:694:21)