try { document.frames[name].document.documentElement.onkeydown = function(evt){ //var b = !!evt, oEvent = evt || window.event; var b = !!evt, oEvent = evt || this.ownerDocument.parentWindow.event; if (oEvent.keyCode == 8) { var node = b ? oEvent.target : oEvent.srcElement; var reg = /^(input|textarea)$/i, regType = /^(text|textarea)$/i; if (!reg.test(node.nodeName) || !regType.test(node.type) || node.readOnly || node.disabled) { if (b) { oEvent.stopPropagation(); } else { oEvent.cancelBubble = true; oEvent.keyCode = 0; oEvent.returnValue = false; } } } } } catch(ex) {}