February 7, 2013

Javascript 列印 頁面的資料

參考來源: http://www.2cto.com/kf/201201/116583.html http://chilionyang.blogspot.tw/2010/10/blog-post.html 一、WebBrowser控件    二、WebBrowder控件的方法 //打印 WebBrowser1.ExecWB(6,1); //打印设置 WebBrowser1.ExecWB(8,1); //打印预览 WebBrowser1.ExecWB(7,1); 关于这个组件还有其他的用法,列举如下: WebBrowser.ExecWB(1,1) 打开 Web.ExecWB(2,1) 关闭现在所有的IE窗口,并打开一个新窗口 Web.ExecWB(4,1) 保存网页 Web.ExecWB(6,1) 打印 Web.ExecWB(7,1) 打印预览 Web.ExecWB(8,1) 打印页面设置 Web.ExecWB(10,1) 查看页面属性 Web.ExecWB(15,1) 好像是撤销,有待确认 Web.ExecWB(17,1) 全选 Web.ExecWB(22,1) 刷新 Web.ExecWB(45,1) 关闭窗体无提示 Javascript function previewScreen(block) { var value = block; var printPage = window.open("", "printPage", ""); printPage.document.open(); printPage.document.write(" "); printPage.document.write(" "); printPage.document.write("

");
                printPage.document.write(value);
                printPage.document.write("
"); printPage.document.close(" "); } html
XXXXXXX
您的姓名為:<%=Name%>

0推薦此文章
Today's Visitors: 0 Total Visitors: 6
Personal Category: Brian的程式筆記 Topic: learning / education / linguistic
[Trackback URL]

Post A Comment









Yes No



Please input the magic number:

( Prevent the annoy garbage messages )
( What if you cannot see the numbers? )
Please input the magic number

誰來收藏
Loading ...
unlog_NVPO 0