diff --git a/public/static/admin.js b/public/static/admin.js index 87338d75a..8bd6cdeb7 100644 --- a/public/static/admin.js +++ b/public/static/admin.js @@ -487,9 +487,10 @@ $(function () { return $(ele).data('input-info', $html.css(style).insertAfter(ele)), $html; }; /*! 表单元素验证 */ + this.form.attr({onsubmit: 'return false;', novalidate: 'novalidate', autocomplete: 'off'}); this.form.off(this.evts, this.tags).on(this.evts, this.tags, function () { that.checkInput(this); - }).attr('novalidate', 'novalidate').data('validate', this).bind("submit", function (evt) { + }).data('validate', this).bind("submit", function (evt) { evt.button = that.form.find('button[type=submit],button:not([type=button])'); /* 检查所有表单元素是否通过H5的规则验证 */ if (that.checkAllInput() && typeof callable === 'function') {