1、ajax请求
$.ajax({
url: "{:U('set_wx')}",
data: data.field,
method: "POST",
dataType: 'JSON',
success: function (res) {
layer.msg(res.msg);
if(res.status == 1) {
setTimeout(function () {
//location.reload();
}, 1500);
}
layer.closeAll('loading');
}
});
2、增加回车事件
document.body.addEventListener('keyup', function (e) {
if (e.keyCode == '13') {
$("#ew80_submit").click();
}
});