<%@ Page language="c#" Codebehind="AccessKeyjavascript.aspx.cs" AutoEventWireup="false" Inherits="示例代码._17.AccessKeyjavascript" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
	<HEAD>
		<title>AccessKeyjavascript</title>
		<meta name="GENERATOR" Content="Microsoft Visual Studio 7.0">
		<meta name="CODE_LANGUAGE" Content="C#">
		<meta name="vs_defaultClientScript" content="JavaScript">
		<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
	</HEAD>
	<body MS_POSITIONING="GridLayout">
		<form id="AccessKeyjavascript" method="post" runat="server">
			<a>捕获键盘按键的示例</a>
		</form>
		<script language="javascript">
function  keyDown()
{
var keycode=event.keyCode;                 
var keychar=String.fromCharCode(keycode);     
alert('ASCII='+keycode+'\nKeyChar='+keychar);   
}
document.onkeydown=keyDown;                  
		</script>
	</body>
</HTML>
