我的click主元素绑定在form表单里,当我提交的时候,layer.confirm总是不点击确认就直接跳转了,所以在click事件中加入如下两个字段 event.preventDefault() event.stopPropagation();