Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用此代码
document.getElementById('frmLogin').submit()
这是工作并发送表单,但验证不起作用!input type="submit"在 asp.net mvc 中使用验证工作时
input type="submit"
在提交表单之前使用它来触发验证:
document.getElementById('btnSubmit').click();
btnSubmit提交按钮的 ID 在哪里,例如
btnSubmit
<input type="submit" id="btnSubmit" />
上面应该完全模仿按钮点击。