[HTML5] Input accepts only 6 number characters

Use 'pattern' tag in html5:

<input type="text" pattern="[0-9]{6}" maxlength="6" required>

 

posted @ 2015-01-09 17:25  Zhentiw  阅读(175)  评论(0编辑  收藏  举报