Javascript print-print page settings-print preview code

Source: Internet
Author: User

<HTML> <Meta http-equiv = Content-Type content = "text/html; charset = gb2312"/>
<Script language = JavaScript>
Function printsetup (){
// Print page settings
Wb.exe CWB (8, 1 );
}
Function printpreview (){
// Print the Page Preview
    
Wb.exe CWB (7,1 );
     
    
}

Function printit ()
{
If (confirm ('Are you sure you want to print? ')){
Wb.exe CWB (6, 6)
}
}
</SCRIPT>

</Head>
<Body>

<Div align = center>
<Object ID = WB Height = 0 width = 0
Classid = CLSID: 8856f961-340a-11d0-a96b-00c04fd705a2 name = WB> </Object>
<Input onclick = javascript: printit () type = button value = Print name = button_print/>
<Input onclick = javascript: printsetup (); type = button value = print page setting name = button_setup/>
<Input onclick = javascript: printpreview (); type = button value = print preview name = button_show/>
</Div>
</Body>
</Html>

# JavaScript/ajax Columns

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.