当前位置:网站首页>获取键代码
获取键代码
2022-07-01 10:53:00 【宇智波-林中路】
1. 获取键代码
<body>
<p>在输入框中输入键盘上的字符获取按下字母的 Unicode 字符代码</p>
<input type="text" onkeypress="myFunction(event)" />
<p id="app"></p>
</body>
<script>
function myFunction() {
var code = event.keyCode;
document.querySelector("#app").innerHTML = " Unicode 值为: " + code;
}
// onkeypress 事件会在键盘按键被按下并释放一个键时发生:
// 提示:与 onkeypress 事件的关联的事件执行顺序:onkeydown 、onkeypress 、onkeyup
</script>边栏推荐
- Sqlachemy common operations
- The list of winners of the digital collection of "century master" was announced
- [encounter Django] - (II) database configuration
- 数字藏品新一轮热度开启
- Graduation season · advanced technology er
- 【论文阅读】Trajectory-guided Control Prediction for End-to-end Autonomous Driving: A Simple yet Strong Ba
- bash: ln: command not found
- bash: ln: command not found
- php 实现抽奖功能
- LeetCode.515. 在每个树行中找最大值___逐一BFS+DFS+按层BFS
猜你喜欢

Suggest collecting | what to do when encountering slow SQL on opengauss?

缺少比较器,运放来救场!(运放当做比较器电路记录)

YoDA统一数据应用——融合计算在蚂蚁风险场景下的探索与实践

bash: ln: command not found

北汽蓝谷:业绩承压,极狐难期

投稿开奖丨轻量应用服务器征文活动(5月)奖励公布

数据库实验报告(一)

Detailed explanation of linear regression in machine learning

The Lantern Festival is held on the fifteenth day of the first month, and the Lantern Festival begins to celebrate the reunion

新一代云原生数据库的设计与实践
随机推荐
推荐一款 JSON 可视化工具神器!
关于#SQL#的问题,如何解决?
Valgrind usage of memory leak locating tool
建议收藏 | 在openGauss上遇到慢SQL该怎么办?
数据库实验报告(二)
NC | 肠道细胞和乳酸菌共同作用来防止念珠菌感染
106. 从中序与后序遍历序列构造二叉树
华为HMS Core携手超图为三维GIS注入新动能
php 实现抽奖功能
.NET 5.0+ 无需依赖第三方 原生实现定时任务
数字藏品市场新局面
云上“视界” 创新无限 | 2022阿里云直播峰会正式上线
CRC check
[MPC] ① quadratic programming problem matlab solver quadprog
LeetCode.每日一题 剑指 Offer II 091. 粉刷房子 (DP问题)
基金管理人的内部控制
大佬们,数据湖iceberg的数据,怎样导出到mysql? 有什么工具? sqoop,datax都没
Huawei HMS core joins hands with hypergraph to inject new momentum into 3D GIS
机器学习之线性回归详解
问下群里的各位,有使用flink oracle cdc的logminer方案,在生产上稳定运行的实际