0

次のページは期待どおりに動作しません。

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
        <script src="js/jquery.js"></script>
    </head>
    <body>
        <script>
            $('body').keypress(function(e){
                console.log('char: ',String.fromCharCode(e.keyCode));
            });
        </script>
    </body>
</html>

などの特殊文字を入力しようとすると、代わりá é í ó úに印刷されます。a e i o u

4

1 に答える 1