Suppress Backspace
//-----------------------------------------------------
//
//-----------------------------------------------------
document.onkeydown = function () {
var e = window.event;
suppressBackspace(e);
};
//-----------------------------------------------------
//
//-----------------------------------------------------
function suppressBackspace(evt) {
evt = evt || window.event;
var target = evt.target || evt.srcElement;
if (evt.keyCode == 8 && !/input|textarea/i.test(target.nodeName)) {
evt.returnValue = false;
}
};
Labels: JavaScript