Home > Web Front-end > JS Tutorial > body text

JavaScript implements printing, print preview, and print settings_javascript skills

WBOY
Release: 2016-05-16 16:23:24
Original
2312 people have browsed it

WebBrowser is IE’s built-in browser control and does not require users to download it.

1. WebBrowser control

2. Method of WebBrowder control //Print

WebBrowser1.ExecWB(6,1);

//Print settings

WebBrowser1.ExecWB(8,1);

//Print preview

WebBrowser1.ExecWB(7,1);

There are other uses for this component, listed below:

WebBrowser.ExecWB(1,1) opens Web.ExecWB(2,1) closes all current IE windows and opens a new window Web.ExecWB(4,1)

Save web page Web.ExecWB(6,1) Print Web.ExecWB(7,1) Print preview Web.ExecWB(8,1)

Print page settings Web.ExecWB(10,1)

View page properties Web.ExecWB(15,1)

It seems to be revoked and needs to be confirmed Web.ExecWB(17,1)

Select all Web.ExecWB(22,1) Refresh Web.ExecWB(45,1)

Close the form silently but printing will print out the entire page. Whatever is on the page will be printed out. Sometimes we only need to print the data table, then we have to write a style:

Hide the parts you don’t want to print: Style content:

Then use the style:

Where printing is not required

The code is as follows:

Copy code The code is as follows:


< ;input type=button name=button_show value="Print preview" class="noprint" onclick="javascript:printpreview();">
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!