web前端|js教程
js,复制,剪切板
web前端-js教程
易语言唯美日历源码,vscode运行后的界面,ubuntu安装sai,tomcat版本查看文件,新闻爬虫 软件,php5.4 nginx,全网霸屏推广seo教程,幼儿园 网站源码,网页登录模板lzw
//复制到剪切板js代码
function copyToClipBoard(s) {
//alert(s);
if (window.clipboardData) {
window.clipboardData.setData("Text", s);
alert("已经复制到剪切板!"+ "\n" + s);
} else if (navigator.userAgent.indexOf("Opera") != -1) {
window.location = s;
} else if (scape) {
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
} catch (e) {
alert("被浏览器拒绝!请在浏览器地址栏输入about:config并回车然后将signed.applets.codebase_principal_support设置为 rue\");
}
var clip = Components.classes[@/widget/clipboard;1].createInstance(Components.interfaces.nsIClipboard);
if (!clip)
return;
var trans = Components.classes[@/widget/transferable;1].createInstance(Components.interfaces.nsITransferable);
if (!trans)
return;
trans.addDataFlavor( ext/unicode);
var str = new Object();
var len = new Object();
var str = Components.classes["@/supports-string;1"].createInstance(Components.interfaces.nsISupportsString);
var copytext = s;
str.data = copytext;
trans.setTransferData("text/unicode", str, copytext.length * 2);
var clipid = Components.interfaces.nsIClipboard;
if (!clip)
return false;
clip.setData(trans, null, clipid.kGlobalClipboard);
alert("已经复制到剪切板!" + "\n" + s)
}
}
企业级项目源码,如何改vscode图标,ubuntu 可玩性,项目不能加到tomcat,sqlite多节点数据同步,马上生产的孕妇梦见身上爬虫子,腾讯 php 招聘,济南论坛营销seo推广,网站图片生存代码大全,字体模板素材免费下载网站lzw