复制内容到剪贴板
代码:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" type="text/css" href="guide.css" />
<title></title>
<!-- 插入打印控件 -->
<OBJECT ID="jatoolsPrinter" CLASSID="CLSID:B43D3361-D075-4BE2-87FE-057188254255" codebase="jatoolsPrinter.cab#version=5,0,0,0"></OBJECT>
<script type="text/javascript">
function doPrint()
{
var ifrm = document.all('PUrl'); //定义iframe
ifrm.onreadystatechange = IframeReady; //判断iframe是否加载完成
ifrm.src = 'simpleprint.htm'; //指定iframe的src的值
}
function IframeReady(){
if(this.readyState == 'complete'){ //如果iframe的readyState为 complete那么就是加载完成
var myDoc = {
documents:this.contentWindow.document, //指定documents的值为iframe的document
copyrights : '杰创软件拥有版权 www.jatools.com'
};
jatoolsPrinter.printPreview(myDoc );
}
}
</script>
</head>
<body >
<br>
<input type="button" value="打印预览..." onClick="doPrint()">
<iframe id='PUrl' style='display:none' />
</body>
</html>