📄 onkeypress.htm
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>
<TITLE>Example for the onkeypress Event</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=iso-8859-1">
<META NAME="AUTHOR" CONTENT="InetSDK">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<SCRIPT>
function checkKey()
{
txtEnterValue.focus();
txtOutput.value = txtEnterValue.value;
if (window.event.shiftKey)
{
txtOutput.value = "true";
}
}
</SCRIPT>
<!-- SAMPLE_STYLE_START -->
<LINK REL="stylesheet" HREF="../../../../../workshop/basicsdkie4.css"
TYPE="text/css">
<!-- SAMPLE_STYLE_END -->
</HEAD>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<BODY TOPMARGIN=0 LEFTMARGIN=0 BGPROPERTIES="FIXED" BGCOLOR="#FFFFFF"
LINK="#000000" VLINK="#808080" ALINK="#000000">
<BLOCKQUOTE CLASS="body">
<H1>onkeypress Sample</H1>
<P>Place the cursor inside this text box, and depress the SHIFT key while pressing another key.</P>
<INPUT TYPE=text NAME=txtEnterValue onkeypress="checkKey()">
<P>Indicates "true" if the SHIFT key is used.<BR>
<INPUT TYPE=text NAME=txtOutput>
<!-- START_PAGE_FOOTER -->
<BR><BR><BR>
© <A CLASS="clsIncCpyRt" HREF="http://msdn.microsoft.com/isapi/gomscom.asp?target=/misc/cpyright.htm" TARGET="_top">2000 Microsoft Corporation. All rights reserved. Terms of use</A>.
<!-- END_PAGE_FOOTER -->
</BLOCKQUOTE>
</BODY>
</HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -