<form method="post" class="layui-form" >
<input name="username" id="doctorCode" placeholder="用户名" type="text" lay-verify="required" class="layui-input" >
<hr class="hr15">
<input name="password" id="doctorPassword" lay-verify="required" placeholder="密码" type="password" class="layui-input">
<hr class="hr15">
<input value="登录" lay-submit lay-filter="login" style="width:100%;" type="button" onclick="login()">
<hr class="hr20" >
<input value="注册" lay-submit lay-filter="login" style="width:100%;" type="submit">
<hr class="hr20" >
<a href="login-user.html" class="layui-btn layui-btn-danger" style="width: 163px; height:40px;">用户登录</a>
<a href="login-admin.html" class="layui-btn layui-btn-danger" style="width: 162px; height:40px;">管理登录</a>
</form>
关于doctorCode与doctorPassword的判空失效,直接去执行ajax
js呢,判断的时候有没有retrun