I have this input
<input name="minSalary" value="49800" style="width: 45px" maxlength="5" id="numbersonly"></td>
and this script
document.getElementById('numbersonly').onkeydown = function(e) {
var key = e.keyCode ? e.keyCode : e.which;
if ( isNaN( String.fromCharCode(key) ) ) return false;
}
Right now the input only responds when numbers are pressed. I would also like to respond to backspace and delete.