1.在页面<head>标签中加上如下代码: <object id='factory' classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' height='0' width='0'></object> 2.调用打印方法 <script type="text/javascript"> function OnPrint() { var htm = document.getElementById("txtHtml").value; //var o = WebApp.PIS_ApplyInfoDetailPH.GetPtintHTML(htm); //if (o != null) { if (htm.length >= 0) { var old = document.body.innerHTML; //document.body.innerHTML = o.value; document.body.innerHTML = htm; document.all.factory.ExecWB(6, 1); document.body.innerHTML = old; } } </script>