<div class="layadmin-user-login-boxlayadmin-user-login-bodylayui-form">
<form class="layui-form login-form">
<div 클래스 ="layui-form-item">
<label class="layadmin-user-login-iconlayui-iconlayui-icon-username"for="account"></label>
<input type="text" id="account" name="account" placeholder="请输入账号" class="layui-input" value="">
</div>
< div class="layui-form-item">
<label class="layadmin-user-login-iconlayui-iconlayui-icon-password" for="password"></label>
<input type="password" name="password" class="layui-input" placeholder="请输入密码" id="password"class="layui-input" value="">
</ div>
<div class="layui-form-item">
<div class="layui-row">
<div class="layui-col-xs7">
<label class="layadmin-user-login-iconlayui-iconlayui-icon-vercode" for="code"></label>
<input type="text"id="code" 이름 ="code" placeholder="图shape验证码" class="layui-input">
</div>
<div class="layui-col-xs5">
<div style= "margin-left:10px;">
<img src="{:captcha_src()}" onclick="reloadimg()" id="img" style="height: 38px;width: 130px">
</div>
</div>
</div>
</div>
<div class="layui-form-item" style="margin-bottom: 20px ;">
<input type="checkbox" name="remember"lay-skin="primary" title="记住密码">
</div>
</form>
<script type="text/javascript">
layui.use(['layer','form'],function(){
var form =layui.form ;
레이어 =layui.layer;
$ =layui.jquery;
// 用户name控件获取焦点
$('#account').focus();
});
function login( ){
var 계정 = $('#account').val();
var 비밀번호 = $('#password').val();
var code = $('#code').val ();
$.post("login",{
계정: 계정,
비밀번호: 비밀번호,
코드:code
},함수(응답){
console.log(응답);
},'json');
}
phpcn牛2023-10-09 10:45:40
귀하의 질문을 잘 이해하지 못하겠습니다. 하지만
$(form).serialize();
또는
$(form).serializeArray();
를 시도해 보세요.