function printing(tb){
var nw = window.open('','','width=800,height=600');
nw.document.open("text/html","gb2312");
<!--nw.document.write('<link rel="stylesheet" type="text/css" href="../css/mycss.css">');-->
nw.document.write("<object classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' id='wb' height='0' width='0'></object>");
nw.document.write(document.getElementById(tb).outerHTML);
nw.document.write("<script>document.all.wb.ExecWB(7,1)</sc"+"ript>");
}tb为打印TABLE的ID
在IE里面可以,在火狐就出现undefined的错误
var nw = window.open('','','width=800,height=600');
nw.document.open("text/html","gb2312");
<!--nw.document.write('<link rel="stylesheet" type="text/css" href="../css/mycss.css">');-->
nw.document.write("<object classid='CLSID:8856F961-340A-11D0-A96B-00C04FD705A2' id='wb' height='0' width='0'></object>");
nw.document.write(document.getElementById(tb).outerHTML);
nw.document.write("<script>document.all.wb.ExecWB(7,1)</sc"+"ript>");
}tb为打印TABLE的ID
在IE里面可以,在火狐就出现undefined的错误
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货