开发者

Set the minlength property jQuery

How to set the minlength property of a input element using jQuery. Its required like that because it will vary.. Is there a jQuer开发者_如何转开发y api to do that?


jQuery validate plugins can do that for you

http://docs.jquery.com/Plugins/Validation/Methods/minlength

$("#myform").validate({
  rules: {
    field: {
      required: true,
      minlength: 3
    }
  }
})
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜