Good morning everyone, I have a problem with a script that works in Chrome but not in Internet Explorer, the script redirects when you press the Esc button (27) using the event.keycode
lei that is not compatible with IE11, how could I work with that browser and still work in Chrome?
My Script
<script>
document.body.addEventListener("keydown", function (event) {
if (event.keyCode === 27) {
window.location.replace("http://localhost:51213/Default.aspx");
}
});
</script>