onkeyup=\"return checknum(this)\"
//判断为0或空或字母时不能输入
function checknum(obj) {
var flagId = obj.id;
var price = obj.value;
if (price == "" || price == "0") {
obj.value = 0;
}
if (price == "" || price == "0")
obj.value = 0;
else if (isNaN(price)) {
obj.value = 0;
}
}
只能输入中文英文数字
/[^\a-\z\A-\Z0-9\u4E00-\u9FA5]/g