javascript 复制连接脚本(兼容ie 、火狐Firefox、Chrome)
function copyToClipboard(meintext) {
if (window.clipboardData){window.clipboardData.clearData();window.clipboardData.setData("Text", meintext);}
else {
var flashcopier = 'flashcopier';
if (!document.getElementById(flashcopier)) {
var divholder = document.createElement('div');
divholder.id = flashcopier;
document.body.appendChild(divholder);
}
document.getElementById(flashcopier).innerHTML = '';
var divinfo = '<embed src="/js/_clipboard.swf" FlashVars="clipboard=' + encodeURIComponent(meintext) + '" width="0" height="0" type="application/x-shockwave-flash"></embed>';
document.getElementById(flashcopier).innerHTML = divinfo;
}
alert("网址已复制好,粘贴发给好朋友一起玩吧^_^");
}