📌  相关文章
📜  提交表单 jquery 浏览器检查 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:03:39.897000             🧑  作者: Mango

代码示例1
var $myForm = $('#myForm');

if(! $myForm[0].checkValidity()) {
  // If the form is invalid, submit it. The form won't actually submit;
  // this will just cause the browser to display the native HTML5 error messages.
  $myForm.find(':submit').click();
}