asp.net web网页局部内容打印 如何用asp.net制作web网页打印局部内容!有那些方案呢?具体代码实例?比如:我要打印网站上的指定那篇文章,要实现这样的打印效果!该怎么解决呢?谢谢大家的帮助和支持? 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 把文章放到DIV里,打印时把其它内容全部 display="none", 这样调用页面打印方法会只打文章。 不打印的加这个css<style media=print> .Noprint{display:none;} </style> <%-- <script language="javascript" type="text/javascript"> function doPrint() { bdhtml=window.document.body.innerHTML; sprnstr="<!--startprint-->"; eprnstr="<!--endprint-->"; prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17); prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr)); window.document.body.innerHTML=prnhtml; window.print(); } </script> --%> 把指定的内容取出来就行了 我有这有DEMO 不过 你要自己修改下http://download.csdn.net/source/1861625 webbrower打印 直接打印window.print() 调用Office导出word,excel等实现打印 crystalrepeat http://topic.csdn.net/u/20090921/20/625a532c-1c97-4bfb-bdf1-7a1ab04fd797.html 方法很简单的直接打印window.print() 调用Office导出word,excel等实现打印 crystalrepeat swfupload上传组件在IE6下有问题?十万火急啊!!!! 如何做1个网上视频培训的网站 comboimg 用过的进,有个问题请教下! asp.net中引用类库,为什么类库中的xml文件不会自动被引用过去? dexplore.exe错误打开不了msdn的帮助文件. HttpHandler问题 一个关于回发的问题 Session的序列化与反序列化问题 ASC函数C#怎么实现? wuyq11大哥 Membership怎么用? GridView 固定表头的问题 显示登录用户的地理位置!如何写代码!!高手
<style media=print>
.Noprint{display:none;}
</style>
function doPrint() {
bdhtml=window.document.body.innerHTML;
sprnstr="<!--startprint-->";
eprnstr="<!--endprint-->";
prnhtml=bdhtml.substr(bdhtml.indexOf(sprnstr)+17);
prnhtml=prnhtml.substring(0,prnhtml.indexOf(eprnstr));
window.document.body.innerHTML=prnhtml;
window.print();
}
</script> --%>
我有这有DEMO 不过 你要自己修改下http://download.csdn.net/source/1861625
直接打印window.print()
调用Office导出word,excel等实现打印
crystalrepeat http://topic.csdn.net/u/20090921/20/625a532c-1c97-4bfb-bdf1-7a1ab04fd797.html
直接打印window.print()
调用Office导出word,excel等实现打印
crystalrepeat