双击复制本页地址的Script代码

<script>
function copyCode(o){o.select();var js=o.createTextRange();js.execCommand("Copy");alert("地址复制成功");}
document.write("<table align=center class=tableborder1 cellpadding=1 cellspacing=0><tr>");
document.write("<td width=10% nowrap class=tablebody1>双击复制本站面地址:</td>");
document.write("<td class=tablebody1><textarea onfocus=this.select() style='width:90%;overflow-y:visible;' ondblclick=copyCode(this) rows=1>");
document.write(self.location+"</textarea></td></tr></table>");
</script>
posted @ 2009-06-10 22:43  随便取个名字算了  阅读(206)  评论(0编辑  收藏  举报