angular - 角上的简单键盘
问题描述
我想制作一个简单的键盘,它发出键盘事件以输入所选的输入元素流动的场景对我不起作用它调度事件放置不要在输入中写入数字
const e = new KeyboardEvent('keypress', {
bubbles: true,
key: '1'
});
document.activeElement.dispatchEvent(e);
event.preventDefault();
任何解决此问题的建议或任何替代方法来制作在多个输入字段中写入的简单键盘
This interface will be used via the touch screen only, so I need a keypad to enter the numbers
解决方案
推荐阅读
- python - 从 crontab 启动时出现 SSL 错误,但在手动启动时却没有——出了什么问题?
- node.js - 我如何从 Node js 服务器上传视频到 Vimeo
- c# - file.Exist 在 localhost 上返回 true 并在服务器 c# 上返回 false
- javascript - 猫鼬在枚举上使用过滤器查找不返回结果
- python - 从数据框中删除选择性行
- python - 如何使用python从get方法将值写入excel
- c# - C# SQLite 检索完整的 blob 并插入完整的 blob
- html - Outlook HTML 电子邮件有额外空间
- amazon-web-services - 有没有办法以自动方式下载帐单报告?
- azure - 如何找出哪个 Log Analytics 工作区具有订阅级别活动日志、Azure ADAudit 日志、登录日志