單擊登錄按鈕無(wú)反應(yīng)
問(wèn)題描述
?<!DOCTYPE HTML><html><head><meta charset="utf-8"><meta name="renderer" content="webkit|ie-comp|ie-stand"><meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"><meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" /><meta http-equiv="Cache-Control" content="no-siteapp" /><!--[if lt IE 9]><script type="text/javascript" src="__STATIC__/lib/html5.js"></script><script type="text/javascript" src="__STATIC__/lib/respond.min.js"></script><![endif]--><link href="__STATIC__/static/h-ui/css/H-ui.min.css" rel="stylesheet" type="text/css" /><link href="__STATIC__/static/h-ui/css/H-ui.login.css" rel="stylesheet" type="text/css" /><link href="__STATIC__/static/h-ui.admin/css/style.css" rel="stylesheet" type="text/css" /><link href="__STATIC__/lib/Hui-iconfont/1.0.8/iconfont.css" rel="stylesheet" type="text/css" /><!--[if IE 6]><script type="text/javascript" src="http://lib.h-ui.net/DD_belatedPNG_0.0.8a-min.js" ></script><script>DD_belatedPNG.fix('*');</script><![endif]--><title>后臺(tái)登錄 - H-ui.admin.page v3.0</title><meta name="keywords" content="H-ui.admin v3.0,H-ui網(wǎng)站后臺(tái)模版,后臺(tái)模版下載,后臺(tái)管理系統(tǒng)模版,HTML后臺(tái)模版下載"><meta name="description" content="H-ui.admin v3.0,是一款由國(guó)人開(kāi)發(fā)的輕量級(jí)扁平化網(wǎng)站后臺(tái)模板,完全免費(fèi)開(kāi)源的網(wǎng)站后臺(tái)管理系統(tǒng)模版,適合中小型CMS后臺(tái)系統(tǒng)。"></head><body><input type="hidden" id="TenantId" name="TenantId" value="" /><div class="header"></div><div class="loginWraper"> <div id="loginform" class="loginBox"> <form class="form form-horizontal" action="index.html" method="post"> <div class="row cl"> <label class="form-label col-xs-3"><i class="Hui-iconfont"></i></label> <div class="formControls col-xs-8"> <input id="" name="name" type="text" placeholder="賬戶" class="input-text size-L"> </div> </div> <div class="row cl"> <label class="form-label col-xs-3"><i class="Hui-iconfont"></i></label> <div class="formControls col-xs-8"> <input id="" name="password" type="password" placeholder="密碼" class="input-text size-L"> </div> </div> <div class="row cl"> <div class="formControls col-xs-8 col-xs-offset-3"> <input name="verify" class="input-text size-L" type="text" placeholder="驗(yàn)證碼" onblur="if(this.value==''){this.value='驗(yàn)證碼:'}" onclick="if(this.value=='驗(yàn)證碼:'){this.value='';}" value="" style="width:150px;"> <img id="verify_img" src="{:captcha_src()}"> <a id="kanbuq" href="javascript:refreshverify();">看不清,換一張</a> </div> </div> <div class="row cl"> <div class="formControls col-xs-8 col-xs-offset-3"> <label for="online"> <input type="checkbox" name="online" id="online" value=""> 使我保持登錄狀態(tài)</label> </div> </div> <div class="row cl"> <div class="formControls col-xs-8 col-xs-offset-3"> <input name="" type="button" id="login" class="btn btn-success radius size-L" value=" 登 錄 ">
</div> </div> </form> </div></div>
<script type="text/javascript" src="__STATIC__/lib/jquery/1.9.1/jquery.min.js"></script><script type="text/javascript" src="__STATIC__/static/h-ui/js/H-ui.js"></script><!--Ajax提交腳本-- ><script>$(function(){ //給登錄按鈕添加點(diǎn)擊事件 $("#login").on('click',function(event){ $.ajax({ type: "POST",//提交方式為POST url: "{:url('checklogin')}",//設(shè)置提交數(shù)據(jù)處理的文件地址 data: $("form").serialize(),//將表彰系列化后提交 datatype: 'json',//設(shè)置提交數(shù)據(jù)類型為是json success: function(data) { //只有返回標(biāo)志位為,再處理alert(data); } }) })})</script><!--刷新驗(yàn)證碼的腳本--><script>
function refreshverify(){ var ts = Date.parse(new Date())/1000;// $("verify_img").attr("src" , "/captcha?id="+ts);//刷新驗(yàn)證碼圖片 var img = document.getElementById('verify_img'); img.src = "/captcha?id="+ts;
}</script></body></html>
public function checklogin(Request $request) {//初始返回參數(shù) $status=0; $result=''; $data=$request -> param(); return['status'=>$status,'message'=>$result,'data'=>$data];
}
問(wèn)題解答
回答1:ajax用post提交還有一個(gè)參數(shù)沒(méi)寫(xiě)吧相關(guān)文章:
1. javascript - react如何獲取offsetX?2. python - sqlalchemy更新數(shù)據(jù)報(bào)錯(cuò)3. html5 - 前端面試碰到了一個(gè)緩存數(shù)據(jù)的問(wèn)題,來(lái)論壇上請(qǐng)教一下4. MySQL中無(wú)法修改字段名的疑問(wèn)5. macos - 無(wú)法source activate python276. PHPExcel表格導(dǎo)入數(shù)據(jù)庫(kù)怎么導(dǎo)入7. css - 移動(dòng)端 盒子內(nèi)加overflow-y:scroll后 字體會(huì)變大8. 運(yùn)行python程序時(shí)出現(xiàn)“應(yīng)用程序發(fā)生異常”的內(nèi)存錯(cuò)誤?9. html - 網(wǎng)頁(yè)的a標(biāo)簽到底要不要寫(xiě)上域名?10. 我在導(dǎo)入模板資源時(shí)遇到無(wú)法顯示的問(wèn)題,請(qǐng)老師解答下

網(wǎng)公網(wǎng)安備