110,571
社区成员
发帖
与我相关
我的任务
分享
string str = "12q34";
string pattern = @"^\d+$";
Console.WriteLine(Regex.IsMatch(str,pattern));
function checkNumber(obj){
var reg = /^\d+$/;
if(!reg.test(obj.value)){
obj.value=obj.value.replace(/[^\d]+/g,"");
}
}