textfield标签怎么用jquery-validation required
1个回答
展开全部
首先引入:
<script src="../lib/jquery.js"></script>
<script src="../dist/jquery.validate.js"></script>
<form class="cmxform" id="commentForm" method="get" action="">
<input id="cname" name="name" minlength="2" type="text" required>
</form>
然后在
<script>
$(function(){
$("#commentForm").validate();
});
</script>
<script src="../lib/jquery.js"></script>
<script src="../dist/jquery.validate.js"></script>
<form class="cmxform" id="commentForm" method="get" action="">
<input id="cname" name="name" minlength="2" type="text" required>
</form>
然后在
<script>
$(function(){
$("#commentForm").validate();
});
</script>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询