📄 accesskeyproperty.aspx
字号:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="accessKeyProperty.aspx.cs" Inherits="accessKeyProperty" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>accessKey Property</title>
<script type="text/javascript">
<!--
function assignKey(type, elem) {
if (window.event.keyCode == 13) {
switch (type) {
case "button":
document.forms["output"].access1.accessKey = elem.value;
break;
case "text":
document.forms["output"].access2.accessKey = elem.value;
break;
case "table":
document.getElementById("myTable").accessKey = elem.value;
}
return false;
}
}
//-->
</script>
</head>
<body>
<h1>accessKey Property Lab</h1>
<hr />
<h4> Settings:</h4>
<form id="output" onsubmit="return false" runat="server">
<h4> Assign an accessKey value to the Button below and press Return: </h4>
<input type="text" size="2" maxlength="1" onkeypress="return assignKey('button', this)" /><br />
<h4> Assign an accessKey value to the Text Box below and press Return:</h4>
<input type="text" size="2" maxlength="1" onkeypress="return assignKey('text', this)" /><br />
<h4> Assign an accessKey value to the Table below (IE5.5+ only) and press Return: </h4>
<input type="text" size="2" maxlength="1" onkeypress="return assignKey('table', this)" />
<br />
<h4> Then press Alt (Windows) or Control (Mac) + the key. <br /></h4>
<em>Size the browser window to view nothing lower than this line.</em>
<hr />
<input type="button" id="access1" value="Standard Button" />
<input type="text" id="access2" />
</form>
<table id="myTable" cellpadding="10" border="2">
<tr>
<th>Quantity</th>
<th>Description</th>
<th>Price</th>
</tr>
<tbody >
<tr>
<td >4</td>
<td>Primary Widget</td>
<td>$14.96</td>
</tr>
<tr>
<td>10</td>
<td>Secondary Widget</td>
<td>$114.96</td>
</tr>
</tbody>
</table>
<!-- // 本页有误-->
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -