第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時(shí)綁定郵箱和手機(jī)立即綁定

表單驗(yàn)證不了是怎么回事?

<body>
<h1>歡迎登錄我的博客網(wǎng)</h1>
<div id="bg">
??? <form id="login" action="" name="forms">
?? ??? ?<h3>用戶登錄</h3>
?? ??? ?<div id="inputs">
?????? ??? ?<lable for="username">賬號<input id="username" type="text" name="Username" autofocus required></lable> <br/>
??????????? <lable for="username">密碼<input id="password" type="password" name="password"? required></lable>
???? ??? ?</div>
?? ???? <div id="actions">
?? ??? ???? <input type="button" id="submit" onClick="#" value="登錄">
?? ??? ???? <input name="提交" type="submit" id="submit" onClick="javascript:location.href='file:///G:/%E5%AD%A6%E4%B9%A0/Untitled-zhuce.html'" value="我要注冊">
?? ???? </div>
??? </form>
</div>
?? ?
???? <script src="../lib/jquery.js"></script>
?? ?<script src="../lib/jquery.mockjax.js"></script>
?? ?<script src="../lib/jquery.form.js"></script>
?? ?<script src="../dist/jquery.validate.js"></script>

???? <script>
??? ??? ?$(document).ready(function(){
??? ??? ??? ?$("#login").validate({
??? ??? ??? ??? ?rules:{
??? ??? ??? ??? ??? ?username:{
??? ??? ??? ??? ??? ??? ?required:true
??? ??? ??? ??? ??? ??? ?minlength:2
??? ??? ??? ??? ??? ??? ?maxlength:10
??? ??? ??? ??? ??? ?},
??? ??? ??? ??? ??? ?password:{
??? ??? ??? ??? ??? ??? ?required:true
??? ??? ??? ??? ??? ??? ?minlength:2
??? ??? ??? ??? ??? ??? ?maxlength:16
??? ??? ??? ??? ??? ?}
??? ??? ??? ??? ?},
??? ??? ??? ??? ?messages:{
??? ??? ??? ??? ??? ?username:{
??? ??? ??? ??? ??? ??? ?required:"必須填寫用戶名"
??? ??? ??? ??? ??? ??? ?minlength:"用戶名最小為2"
??? ??? ??? ??? ??? ??? ?maxlength:"用戶名最大為10"
??? ??? ??? ??? ??? ?},
??? ??? ??? ??? ??? ?password:{
??? ??? ??? ??? ??? ??? ?required:"必須填寫密碼"
??? ??? ??? ??? ??? ??? ?minlength:"密碼最小為2"
??? ??? ??? ??? ??? ??? ?maxlength:"密碼最大為16"
??? ??? ??? ??? ??? ?}
??? ??? ??? ??? ?}
??? ??? ??? ?})
??? ??? ?});
???? </script>
</body>

正在回答

1 回答

name="Username" ? 你的name是 大寫的 ? ?jquery你寫的 小寫 ?當(dāng)然不能驗(yàn)證了,驗(yàn)證是通過name屬性來驗(yàn)證的

0 回復(fù) 有任何疑惑可以回復(fù)我~
#1

全軍出擊 提問者

非常感謝!
2016-11-07 回復(fù) 有任何疑惑可以回復(fù)我~

舉報(bào)

0/150
提交
取消

表單驗(yàn)證不了是怎么回事?

我要回答 關(guān)注問題
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號