$("[name^=painter_]:input").keyup(function(){
if(/[^\d]/g.test(this.value)){
this.value=this.value.replace(/[^\d]/g,'');
this.focus();
alert('请输入数字!');
return false;
}
});
if(/[^\d]/g.test(this.value)){
this.value=this.value.replace(/[^\d]/g,'');
this.focus();
alert('请输入数字!');
return false;
}
});