<script type="text/javascript" language="javascript">
//復制到剪切板js代碼
function copyToClipBoard(s) {
//alert(s);
if (window
window
alert("已經復制到剪切板!"+ "n" + s);
} else if (navigator
window
} else if (window
try {
netscape
} catch (e) {
alert("被浏覽器拒絕!n請在浏覽器地址欄輸入
}
var clip = Components
if (!clip)
return;
var trans = Components
if (!trans)
return;
trans
var str = new Object();
var len = new Object();
var str = Components
var copytext = s;
str
trans
var clipid = Components
if (!clip)
return false;
clip
alert("已經復制到剪切板!" + "n" + s)
}
}</script>
From:http://tw.wingwit.com/Article/program/Java/JSP/201311/20557.html