var isAvailableId = function(id){
// can match number or number begin with "#"
var reg = new RegExp('^(#)?[0-9]*$');
return reg.test(id);
};
var isAvailableId = function(id){
// can match number or number begin with "#"
var reg = new RegExp('^(#)?[0-9]*$');
return reg.test(id);
};
转载于:https://www.cnblogs.com/qin-xiaoyang/p/6000596.html