Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if (typeof(window.event)!='undefined')//ie
- {document.onkeydown=function()
- {var tag_name=event.srcElement.tagName.toUpperCase();
- if (tag_name!='INPUT' && tag_name!='TEXTAREA')
- {return event.keyCode!=8;
- }
- };
- }
- else //firefox, chrome
- {window.addEventListener('keydown',function(evt){if (evt.keyCode==8){evt.preventDefault();}}, true);
- }
Add Comment
Please, Sign In to add comment