none
Can't be modify the value of window.event.keyCode in IE 11(Windows 7 Premium) where as in IE 8 (Windows XP) its working fine RRS feed

  • General discussion

  • The following is the sample code whcih I have used to check.<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Sample Form</title>
    <script type="text/javascript">
    function keyDownEvent() {
    alert("KD:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KD:"+window.event.keyCode);
    }
    function keyPressEvent() {
    alert("KP:"+window.event.keyCode);
    window.event.keyCode=0;
    alert("KP:"+window.event.keyCode);
    }
    </script>
    </head>
    <body>
    <form>
    <input type="text" onkeydown="keyDownEvent()" onkeypress="keyPressEvent()" />
    </form>
    </body>
    </html>

    Kindly post your answers, am waiting for answers...

    Monday, March 24, 2014 9:46 AM

All replies

  • This is the TechNet Forum for questions regarding Internet Explorer 8, 9, 10, 11 for the IT Pro Audience. Topics covered are: Installation, Deployment, Configuration, Security, Group Policy, Management questions.

    For better assistance please ask for help in the MSDN IE Development Forums.

    Thanks & Regards,

    Vincenzo Di Russo
    Microsoft® MVP Windows Internet Explorer, Windows & Security Expert - since 2003.
    Moderator in the Microsoft Community and TechNet Forums
    My MVP Profile

    Monday, March 24, 2014 10:03 AM