正则怎么让输入框只输入正整数?
phpcn_u391
phpcn_u391 2017-03-16 14:42:11
0
2
1645

在一个input框,希望正则验证输入的值只是正整数

phpcn_u391
phpcn_u391

reply all(2)
数据分析师

How to make the input box only input positive integers with regular expressions? - PHP Chinese website Q&A - How to make the input box only input positive integers with regular expressions? - PHP Chinese website Q&A

Take a look around and learn.

阿神
<input type="text" pattern="^[1-9]\d*">


Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template