한국어
<html> <meta http-equiv="Content-Type" content="text/html; charset=gb2312"> <head> <script 언어="javascript"> var ie =navigator.appName=="Microsoft Internet Explorer" ?true:false; function keyDown(e) { if(!ie) { var nkey=e.which; var iekey='이제 ns 브라우저입니다'; var realkey=String.fromCharCode(e.which); ) { var iekey=event.keyCode; var nkey='이제 IE 브라우저입니다'; var realkey=String.fromCharCode(event.keyCode); if(event.keyCode==32){realkey='' space ' '} if(event.keyCode==13){realkey='' Enter''} if(event.keyCode==27){realkey='' Esc''} if(event.keyCode= =16 ){realkey='' Shift''} if(event.keyCode==17){realkey='' Ctrl''} if(event.keyCode==18){realkey='' Alt ' '} } Alert('ns 브라우저의 키 값:'+nkey+'n'+'예: 브라우저의 키 값:'+iekey+'n'+'실제 키는'+realkey) } document . onkeydown = keyDown; </script> </head> <body> //Javascript Document. <hr> <center> <h3>아무 키나 눌러주세요. . . . </h3> </center> </body> </html>