猿问

validate验证 没有反应

<!DOCTYPE html>

<html>

<head>

<meta charset="UTF-8" />

<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">

<title></title>

<meta name="viewport" content="width=device-width">

</head>

<body>

    <!--Wrapper-->

    <div id="wrapper">

<!-- Start main content -->

<div id="container_full">

<div>

<div id="bridge">

<div id="fb-root"></div>

<div>   

 

 <div class="page-header ">

 <h1>注册</h1>

 <p>创建属于你的账号</p>     

<!-- Client details sub links -->

 </div>

 <form method="get" action="#" id="commentForm">


<div>

 <div>   

<div>

 <label for="name">姓名</label>

 <input type="text" name="name" id="name"  value=""

/>

</div>

 


<div>

 <label for="email">邮件地址</label>

 <input type="text" name="email" id="email" value="" />

</div>

 

<div>

 <label for="password">密码</label>

 <input type="password" name="password" id="password" class="form-control " value="" />

</div>

 

<div>

 <label for="password2">确认密码</label>

 <input type="password" name="password2" id="password2" value="" />

</div>

 


 </div>

 


</div>

<hr />

<button type="submit" name="submit" value="">注册</button>


 </form>

</div>

 

</div><!--end bridge-->

</div>

</div>


</div>

<!-- End / Page wrap -->


<script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>

    <script type='text/javascript' src='js/jquery.validate.min.js'></script>

<script type='text/javascript' src='js/jquery-ui.js'></script>

<script type='text/javascript' src='js/jquery-migrate.min.js'></script>

<script type='text/javascript' src='js/jquery.themepunch.tools.min.js'></script>

<script type='text/javascript' src='js/jquery.themepunch.revolution.min.js'></script> 

<script type="text/javascript" src="js/slideshow-homepage.js"></script>

<script type='text/javascript' src='js/loading.js'></script>

<script type='text/javascript' src='js/accordion.js'></script>

<script type='text/javascript' src='js/lasted-blog-slide.js'></script>

<script type='text/javascript' src='js/comment-reply.min.js'></script>

<script type='text/javascript' src='js/jquery.form.min.js'></script>

<script type='text/javascript' src='js/scripts.js'></script>

<script type='text/javascript' src='js/jquery.blockUI.min.js'></script>

<script type='text/javascript' src='js/retina.min.js'></script>

<script type='text/javascript' src='js/bootstrap.min.js'></script>

<script type='text/javascript' src='js/jquery.appear.min.js'></script>

<script type='text/javascript' src='js/jquery.countTo.js'></script>

<script type='text/javascript' src='js/jquery.countdown.js'></script>

<script type='text/javascript' src='js/jquery.fitvids.js'></script>

<script type='text/javascript' src='js/readmore.js'></script>

<script type='text/javascript' src='js/subscribre.js'></script>

<script type='text/javascript' src='js/jquery.owl.carousel.js'></script>

<script type='text/javascript' src='js/easyResponsiveTabs.js?'></script>

<script type='text/javascript' src='js/jquery.circliful.min.js'></script>

<script type='text/javascript' src='js/jquery.sticky.js'></script>

<script type='text/javascript' src='js/jquery.cubeportfolio.min.js'></script>

<script type='text/javascript' src='js/portfolio.js'></script>

<script type='text/javascript' src='js/chosen.jquery.min.js'></script>

<script type='text/javascript' src='js/custom.js'></script>

<script type='text/javascript' src='js/accordion.min.js'></script>



<script>

$(document).ready(function(){

alert("zifu");

$("#commentForm").validate({

rules:{

name:{

required:true,

minlength:2,

maxlength:10

},

email:{

required:true,

email:true

}

},

messages:{

name:{

required:"必须填写用户名",

minlength:"密码最短为2位",

maxlength:"密码最长为10位"

},

email:{

required:"必须填写邮箱地址",

minlength:"邮箱最短为2位",

maxlength:"邮箱最长为10位"

}

}

});

});

</script>

</body>

</html>


qq_不像白羊座的白羊座_0
浏览 2738回答 2
2回答

echo_kinchao

你的结构写错了

李晓健

你这里有一个中文逗号
随时随地看视频慕课网APP
我要回答