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

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

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


input type='number' 也行。。。

原文地址:https://www.cnblogs.com/MartinLee/p/7622524.html