复制到没有Flash的剪贴板 [英] Copy to clipboard without Flash

查看:160
本文介绍了复制到没有Flash的剪贴板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我找到了许多复制到剪贴板的解决方案,但它们都是使用flash或网站方面。
我正在寻找方法复制到剪贴板自动,没有闪存和用户方面,它是用户脚本,当然还有跨浏览器。

I found many solutions for copying to the clipboard, but they all either with flash, or for websites side. I'm looking for method copy to clipboard automatically, without flash and for user side, it's for userscripts and of course cross-browser.

推荐答案

没有闪存,在大多数浏览器中根本不可能。用户的剪贴板是一种与安全相关的资源,因为它可能包含密码或信用卡号等内容。因此,浏览器正确地不允许Javascript访问它(有些允许它显示用户已经确认的警告,或者使用签名的Javascript代码,但没有一个是跨浏览器)。

Without flash, it's simply not possible in most browsers. The user's clipboard is a security-relevant resource since it could contain things like passwords or credit card numbers. Thus, browsers rightly don't allow Javascript access to it (some allow it with a warning shown that the user has confirm, or with signed Javascript code, but none of that is cross-browser).

这篇关于复制到没有Flash的剪贴板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆