输入账号回显头像操作
<input type="text" id="merTel" name="merTel"
lay-verify="username" style="font-size: 20px;"
autocomplete="off" placeholder="请输入电话" class="layui-input">
<img src="<%=basePath%>images/logo.png" id="img"/>
$(function () {
$("#merTel").blur(function () {
var a=document.getElementById("merTel").value;
$.ajax({
type : 'get',
url : '<%=basePath%>LoginImg?merId='+a,
dataType : "json", //返回数据形式为json
success : function(result) {
document.getElementById("img").src="<%=basePath%>images/"+result;
},
});
});
});