Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <html>
- <head>
- <script type="text/javascript" src="https://code.jquery.com/jquery-1.9.1.js"></script>
- <title>testing</title>
- <script type="text/javascript">
- $(document).ready(function () {
- $(document).on("keydown keypress", function (e) {
- $('input').focus();
- if (console && console.log) {
- console.log(e.type + ": code = " + e.keyCode + " and value = " + e.which + ". charCode = " + e.charCode);
- }
- });
- });
- </script>
- </head>
- <body>
- <p>Click here</p>
- <input type="text" />
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement