js+flash(as3)实现复制文字内容到剪切板实例页面

展示

回到相关文章 >>
您可以试着将文字粘贴到下面的文本域中看看是否复制成功:

代码

JS代码:
var copyCon = document.getElementById("zxxTestArea").value;
var flashvars = {
    content: encodeURIComponent(copyCon),
    uri: '../image/flash_copy_btn.png'
};
var params = {
    wmode: "transparent",
    allowScriptAccess: "always"
};
swfobject.embedSWF("../js/clipboard.swf", "forLoadSwf", "52", "25", "9.0.0", null, flashvars, params);

function copySuccess(){
    //flash回调
    alert("复制成功!");
}