Anyone know how can I disable backspace and delete key with Javascript in IE? This is my code below, but seems it\'s not work for IE but fine for Mozilla.
on
update based on @JoeCoders comment and the 'outdatedness' of my answer, I revised it.
document.querySelector([text input element]).onkeydown = checkKey; function checkKey(e) { e = e || event; return !([8, 46].indexOf(e.which || e.keyCode || e.charCode) > -1); }
See also this jsFiddle