- 1、本文档共20页,可阅读全部内容。
- 2、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
- 3、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 4、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
查看更多
只打印局部(国外英文资料)
只打印局部(国外英文资料)
1: the WebBrowser printing
Controls in IE in the application
center class = Noprint / / class = Noprint doesnt print
OBJECT id = WebBrowser height = 0 width = 0 classid = CLSID: 8856f961-340a-11d0 - a96b-00c04fd705a2
Input type = button class = b_01 style = width: 70 value = close onclick = window.close () imageType = cancel . have spent have spent
input type = button class = b_01 style = width: 70 value = print onclick = document.all.webbrowser. have spent have spent
input type = button class = b_01 style = width: 100 value = direct print onclick = document.all.webbrowser. ExecWB (6, 6) / ! - no printer form -
Input type = button class = b_01 style = width: 100 value = page Settings onclick = document.all. WebBrowser. ExecWB (8, 1) /
input type = button class = b_01 style = width: 100 value = print preview onclick = document.all. WebBrowser. ExecWB (7, 1) /
/ center
STYLE media = print
. The Noprint {
DISPLAY: none
}
. PageNext {
PAGE BREAK - AFTER: always
}
/ STYLE
2:
JS implements simple page local printing
The function the preview (oper) {
If (oper 10) {
BDHTML = window. The document. The body. The innerHTML; / / get the HTML code for the current page
SPRNSTR = ! - startprint + -. / / set the printing start area
Eprnstr = ! -endprint + -. / / set the print end area
PRNHTML = bdhtml.substring (SPRNSTR) + 18); / / take the HTML from the start code
PRNHTML = prnhtml.substring (0, prnhtml.indexof (eprnstr)); / / take HTML from the end of the code
Window. The document. The body. The innerHTML = PRNHTML;
Window. The print ();
Window. The document. The body. The innerHTML = BDHTML;
} else {
Window. The print ();
}
}
Use simple to add content from the page to the middle ! Startprint1- XXXXX ! - endprint1 -- --
And then Im going to put a print click on newonclick = preview (1)
How does WEB printing block the current page path elements?
Method one:
The style
@media print {. Ipt {display: none}}
/ style
Add class = ipt to the element
文档评论(0)