正则表达式匹配负数和数字

 ^[\-|0-9][0-9]* 

 ^[\-|0-9][0-9]{1,}$


input type='number' 也行。。。

posted @ 2017-08-21 17:49  Martin_lee  阅读(7037)  评论(0编辑  收藏  举报