<script>
function copy(v){
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=\"_clipboard.swf\" FlashVars=\"clipboard=" + escape(v) + "\" width=\"0\" height=\"0\" type=\"application/x-shockwave-flash\"></embed>";
document.getElementById(flashcopier).innerHTML = divinfo;
}
</script>
<input onclick="copy(this.value)" type="text" value="this is a text" />
swf:http://www.cnitblog.com/Files/asfman/_clipboard.swf
as:
if (clipboard.length)
{
System.setClipboard(clipboard);
}
posted on 2008-11-04 20:31
汪杰 阅读(157)
评论(0) 编辑 收藏 引用 所属分类:
javascript