有没有办法完全模拟单击键盘按钮?
我创建了一个扩展程序来操纵网站输入,在某些输入中,我需要使用键盘按钮模拟插入值。
我试图使用value
属性插入值,但它不起作用,我总是需要用双手插入值单击按钮,以便网站可以完成某些工作,而这些工作不会通过插入而不会发生使用value
的值
我尝试了dypatchevent
newKeyBoardEvent
and keydown ,但不幸的是,它也无法正常猜猜它不会模仿键盘按钮事件的完整功能,
因此是否有任何方法可以完全模仿按下键盘按钮?
I have created an extension that manipulate a website inputs, in some inputs i need to simulate inserting value using keyboard buttons.
I tried to insert the value using value
property but it doesn't work, i always need to insert the value with my hands clicking the buttons so the website can do some work which doesn't happen by inserting the value using value
i tried dispatchEvent
with newKeyboardEvent
and keydown
but unfortunatley it doesn't work too which made me guess that it doesn't mimic the full function of keyboard button events
So is there any way to fully mimic pressing keyboard buttons?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论