function numInteger(){
if((event.keyCode>=48 && event.keyCode<=57) || (event.keyCode>=96 && event.keyCode<=105))
{
return true;
}else if(event.keyCode==8 || event.keyCode==9){ //保留回格键和tab键
return true;
}else{
event.returnValue = false;
}
}
function numInteger(){
if((event.keyCode>=48 && event.keyCode<=57) || (event.keyCode>=96 && event.keyCode<=105))
{
return true;
}else if(event.keyCode==8 || event.keyCode==9){ //保留回格键和tab键
return true;
}else{
event.returnValue = false;
}
}
转载于:https://www.cnblogs.com/jiangtuzi/p/3758368.html