错误内容:
Uncaught TypeError: 'checkValidity' called on an object that does not implement interface HTMLButtonElement.
js代码:
<script>
layui.use(['form'], function () {
var form = layui.form,
layer = layui.layer;
// 添加学生操作
form.on('submit(submit)', function (data) {
$.post("stu/insert",{data},function (resquest){
if (resquest.code == 200){
layer.msg("添加成功!")
}else {
layer.msg("添加失败!")
}
return false;
})
})
})
</script>