Layui文本框失去焦点和AJAX验证msg弹框的使用

$("#name").blur(function(){
var value = this.value;
var node = this;
$.post('<%=root%>/user/checkName',{name:value},function (data) {
if(data=='false'){
layer.msg('['+value+']已经被占用',{icon: 5});//!,ok,wrong,question,lock,cry,smile
node.focus();
}

});
})

猜你喜欢

转载自www.cnblogs.com/java-ty/p/12979919.html