Restricting text box inputs to a given regexp using jQuery

前端 未结 4 2039
被撕碎了的回忆
被撕碎了的回忆 2020-12-20 07:23

Consider the following text box:


Using jQuery I want to restrict the

4条回答
  •  没有蜡笔的小新
    2020-12-20 07:57

    I advise you to let the user tpye whatever he wants, then do a validation on submit of the form. (Of course you must still check on the server-side as he could easily disable or alter the javascript validation code)

    For validation look into the

    jQuery Validation Pluging

提交回复
热议问题