我正在开发一个单页应用程序,我在页面上有一个按钮,当用户单击按钮我想对我的服务器进行ajax调用,然后将返回的值(通过回调)复制到用户的剪贴板.
@H_502_12@解决方法
每个组件都是孤立的,但是当我将它们粘合在一起时,Firefox会返回以下错误:
document.execCommand(‘cut’/‘copy’) was denied because it was not
called from inside a short running user-generated event handler
在Firefox上它只适用于点击处理程序,参考
Interact_with_the_clipboard