首页 > 解决方案 > 如何在 Node js 中调用击键 CTRL+V?

问题描述

如何在 nodejs 中调用模拟键 CTRL+V ?我使用 nwjs,在我使用 Iframe 的应用程序中,我在其中找到元素输入。对于这个输入,我想运行事件 CTRL+V(粘贴)。由于我已经有一个复制的值,我想为此输入运行一个粘贴事件。

我想尝试通过 document.execCommand('paste')。但是在输入内部不可能执行事件 document.execCommand('paste')。

我该如何实施?

标签: javascriptnode.jsnwjs

解决方案


推荐阅读