//可以输入一个小数点,和可以使用退格 function moneyInput(handle){ var key = event.keyCode; if( (key > 95 && key < 106) || (key > 47 && key < 60) || (key == 9) || (key == 46) || (key >= 37 && key <= 40) || (key == 110 && handle.value.indexOf(".") < 0 )|| (key == 190 && handle.value.indexOf( ".") < 0 )){ }else if(key != 8){ event.returnValue = false; } } function IntInput(handle){ var key = event.keyCode; if( (key > 95 && key < 106) || (key > 47 && key < 60) || (key == 9) || (key == 46) || (key >= 37 && key <= 40) ){ }else if(key != 8){ event.returnValue = false; } }