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

為了賬號安全,請及時綁定郵箱和手機立即綁定

是導(dǎo)入的validate.js文件不對嗎,為什么怎么弄都沒反應(yīng),是在官網(wǎng)下的jquery-validation-1.15.0呀?還是代碼寫錯了?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>validate表單驗證</title>
<script src="js/jquery-1.12.4.min.js" type="text/javascript"></script>
<script src="js/jquery.validate.js" type="text/javascript"></script>
<style>
?? ?body
?? ?{
?? ??? ?font-size:30px;
?? ?}
?? ?label
?? ?{
?? ??? ?display:inline-block;
?? ??? ?min-width:140px;
?? ?}
?? ?#demoForm
?? ?{
?? ??? ?margin:0px auto;
?? ??? ?padding:inherit;
?? ??? ?height:100px;
?? ??? ?border:solid 1px #999;
?? ??? ?width:180px;
?? ?}
?? ?input.error
?? ?{
?? ??? ?border:solid 2px red;
?? ?}
?? ?input
?? ?{
?? ??? ?
?? ?}
?? ?
</style>
</head>

<body>
?? ?<form id="demoForm">
?? ??? ?<fieldset>
?????? ??? ?<legend>用戶登錄 </legend>
?????????? ??? ?
????????? ?
??????????????? <p>
?????????????? ??? ?<label for="username">用戶名</label>
??????????????????? <input type="text" id="username" class="username"/>
??????????????? </p>
??????????????? <p>
?????????????? ??? ?<label for="password">用戶密碼</label>
??????????????????? <input type="password" id="password" class="password"/>
??????????????? </p>? ?
??????????????? <p>
?????????????? ??? ?<input type="submit" value="登錄" />
??????????????? </p>
??????? </fieldset>
??? </form>
??? <script>
?? ??? ?$(document).ready(function(){
?? ??? ??? ?$("#demoForm").validate({
?? ??? ??? ??? ?rules:{
?? ??? ??? ??? ??? ?username:{
?? ??? ??? ??? ??? ??? ?required:true,
?? ??? ??? ??? ??? ??? ?minlength:2,
?? ??? ??? ??? ??? ??? ?maxlength:10
?? ??? ??? ??? ??? ?},
?? ??? ??? ??? ??? ?password:{
?? ??? ??? ??? ??? ??? ?required:true,
?? ??? ??? ??? ??? ??? ?minlength:2,
?? ??? ??? ??? ??? ??? ?maxlength:10
?? ??? ??? ??? ??? ?},
?? ??? ??? ??? ?}
?? ??? ??? ??? ?
?? ??? ??? ??? ?
?? ??? ??? ?});
?? ??? ?});
??? </script>
?? ?
</body>
</html>

正在回答

1 回答

你要給input 加上name屬性<input type="text" id="username" name="username"?class="username"/>

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

weibo_幸福長大了_0 提問者

謝謝了 犯了這么不該犯的錯誤 還讓我找了半天
2016-05-30 回復(fù) 有任何疑惑可以回復(fù)我~

舉報

0/150
提交
取消

是導(dǎo)入的validate.js文件不對嗎,為什么怎么弄都沒反應(yīng),是在官網(wǎng)下的jquery-validation-1.15.0呀?還是代碼寫錯了?

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

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

幫助反饋 APP下載

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

公眾號

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