1、设置输入框只能为数字:<input οnkeyup="return val_int(this)" ..../>
function val_int(o){
if(! /^\d*$/.test(o.value)){
o.value = o.value.substr(0, o.value.length-1);
}
}
1、设置输入框只能为数字:<input οnkeyup="return val_int(this)" ..../>
function val_int(o){
if(! /^\d*$/.test(o.value)){
o.value = o.value.substr(0, o.value.length-1);
}
}