Shaofh

Shaofh

JS获取剪贴板内容的代码

JS获取剪贴板内容的代码。

<Script Language="JavaScript">
var content = clipboardData.getData("Text");
if (content!=null) {
document.write("<center><font size=5 color=red>WARNING, TEXT RETRIEVED:</font> (see below)<br><br><span style='background-color: #FFFF00'>");
document.write(content);
document.write("</span>");}
else {document.write('<center>No text found in clipboard. This is a good thing!<br><br>Works with Internet Explorer and Netscape.');}
</Script>

posted on 2006-10-24 14:10  sh37  阅读(1683)  评论(0编辑  收藏  举报

导航