用js控制输入框只能输入数字:
function checkNumber(e) { var keynum = window.event ? e.keyCode : e.which; if ((48 <= keynum && keynum <= 57) || (96 <= keynum && keynum <= 105) || keynum == 8) { return true; } else { return false; } }
用js控制输入框只能输入数字:
function checkNumber(e) { var keynum = window.event ? e.keyCode : e.which; if ((48 <= keynum && keynum <= 57) || (96 <= keynum && keynum <= 105) || keynum == 8) { return true; } else { return false; } }