加一个按钮<input name="query" type="button" class="button" id="query2" value=" 打 印 " onClick="self.print();">
然后再<body onbeforeprint="javascript:document.all.prints.style.display='none'" onafterprint="javascript:document.all.prints.style.display=''">隐藏不打印的部分prints是对象的id,比如button所在的table不打印<table border="0" align="center" cellpadding="0" cellspacing="0" width="100%" id="prints">。
然后再<body onbeforeprint="javascript:document.all.prints.style.display='none'" onafterprint="javascript:document.all.prints.style.display=''">隐藏不打印的部分prints是对象的id,比如button所在的table不打印<table border="0" align="center" cellpadding="0" cellspacing="0" width="100%" id="prints">。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货