js 调用打印

js打印代码:
var bdhtml=document.getElementById("content1").innerHTML;
window.document.body.innerHTML=bdhtml;
window.print();





  var text = $("#printWnd")[0].innerHTML;
printView(text); //打印预览

//打印预览
function printView(obj){
var oWin=window.open("","_blank");   
var strPrint="

补考费-打印预览

\n";   
 
strPrint=strPrint +"

你可能感兴趣的:(js)