JavaScript 正整数正则表达式
function testNumber(){
var yourinputValue=$("#yourinputId").val();
var reg = /^[1-9]\d*$/;
alert(reg.test(yourinputValue))
}
- 上一篇 »PHP常用正则表达式汇总
- 下一篇 »php正则表达式函数
function testNumber(){
var yourinputValue=$("#yourinputId").val();
var reg = /^[1-9]\d*$/;
alert(reg.test(yourinputValue))
}