JS输入只能为数字的函数
js函数实现输入只能为数字。用onkeypress属性控制
function JHshNumberText(){
if ( !(((window.event.keyCode >= 48) && (window.event.keyCode <= 57))
|| (window.event.keyCode == 13) || (window.event.keyCode == 46)
|| (window.event.keyCode == 45))){
window.event.keyCode = 0 ;
}
}