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>
<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>