当前位置:网站首页>获取键代码
获取键代码
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>边栏推荐
- LeetCode.515. 在每个树行中找最大值___逐一BFS+DFS+按层BFS
- 12 plateformes de gestion de produits utilisées par tout le monde
- 12. Gateway new generation gateway
- Compliance management of fund managers
- 大佬们,数据湖iceberg的数据,怎样导出到mysql? 有什么工具? sqoop,datax都没
- 2022年现在在网上开通股票账户安全吗?会不会有什么危险?
- [MPC] ② quadprog solves positive definite, semi positive definite and negative definite quadratic programming
- Valgrind usage of memory leak locating tool
- dotnet 控制台 使用 Microsoft.Maui.Graphics 配合 Skia 进行绘图入门
- Website source code whole site download website template source code download
猜你喜欢

我国蜂窝物联网用户已达 15.9 亿,年内有望超越移动电话用户

12 product management platforms that everyone is using

十年磨一剑:蚂蚁集团可观测性平台 AntMonitor 揭秘

个人商城二开逍遥B2C商城系统源码-可商用版/拼团拼购优惠折扣秒杀源码

Mobile hard drive reads but does not display drive letter

Half of 2022 has passed, isn't it sudden?

Rising Stars in Plant Sciences (RSPS2022) Finalist科学演讲会(6.30晚9点)

mysql如何把 一个数据库中的表数据 复制到 另一个数据库中(两个数据库不在同一个数据库链接下)

CodeBlocks 左侧项目栏消失,workspace 自动保存项目,Default workspace,打开上次的workspace,工作区(图文教程,已解决)

数据库实验报告(一)
随机推荐
bash: ln: command not found
Can I choose to open an account on CICC securities? Is it safe?
Is it safe to open a stock account online in 2022? Is there any danger?
【MPC】②quadprog求解正定、半正定、负定二次规划
SQL Server列一相同的情况下,如何取列二的最大值,并重新生成表
New situation of digital collection market
[.net6] use ml.net+onnx pre training model to liven the classic "Huaqiang buys melons" in station B
12. Gateway new generation gateway
What a high commission! The new programmer's partner plan is coming. Everyone can participate!
678. Valid bracket string
Combinaison Oracle et json
Personal mall two open Xiaoyao B2C mall system source code - Commercial Version / group shopping discount seckill source code
基金管理人的内部控制
谷歌新论文-Minerva:用语言模型解决定量推理问题
442. duplicate data in array
I'd like to know where I can open an account in Guangzhou? Is it safe to open an account online now?
Internal control of fund managers
Submission lottery - light application server essay solicitation activity (may) award announcement
新一代云原生数据库的设计与实践
CRC 校驗