Disable back function in HTML
Posted on 2007-10-01
if (event.keyCode == 8 && event.srcElement.form == null)
event.cancelBubble = true;
event.returnValue = false;
<body onkeydown = "cancelBack();">
I use the above code do disable the back function in IE, but the problem is that when I disable the backspace key, I could not delete any words I enter in the text input.
How to I disable the back function and at the same time be able use the backspace to delete my input?