Print the area of the page, and print the method of not displaying the footer URL

Source: Internet
Author: User

Method 1-this method is easy to use, but does not support page settings. The URL of the page is displayed at the bottom.

Print command: you only need to call this JavaScript code in the button event on the page.Code

 
  Javascript: window. Print ();

================================

CSS definition:

   code highlighting produced by actipro codehighlighter (freeware) 
http://www.CodeHighlighter.com/
-->

==============================

Method 2-Use the meadroid control to set the page. You can customize the header and footer to remove the URL at the bottom of the page.

 

  1   <  Object  ID  = "Factory"  Style  = "Display: none"  Viewastext classid  = "CLSID: 1663ed61-23eb-11d2-b92f-008048fdd814"  Codebase = "Http://www.meadroid.com/scriptx/ScriptX.cab#Version=5,60,0,360"  > </  Object  >  
2
3 < Title > Page settings </ Title >
4 < Input Type = "Button" Value = "Page settings"
5 Onclick = "Factory. Printing. pagesetup ()" >
6 < Input Type = "Button" Value = "Print preview"
7 Onclick = "Factory. Printing. Preview ()" >
8
9 < Script >
10 Function Window. onload (){
11 Factory. Printing. Header = " Center display on left & center display on B & page on right, page & P/total & P "
12 Factory. Printing. footer = " (Custom footer) "
13 Factory. Printing. leftmargin = 0.75
14 Factory. Printing. topmargin = 1.5
15 Factory. Printing. rightmargin = 0.75
16 Factory. Printing. bottommargin = 1.5
17 }
18 </ Script >
19

 

==================================

CSS-display parameters:
 
Block: the default value of css1. Add a new line after using this value as the object
None: css1 hidden object. Unlike the hidden value of the visibility attribute, it does not reserve its physical space for hidden objects.
Inline: the default value of css1 inline object. Use this value to delete rows from an object.
Compact: css2 allocates objects as block objects or Inline objects based on content.
Marker: css2 specifies the content before or after the container object. To use this parameter, the object must be used with the: After and: Before pseudo elements.
Inline-table: css2 displays the table as an inline object or an inline container without line breaks
List-item: css1 specifies a block object as a list item. You can also add optional project logos.
Run-in: css2 assigns an object as a block object or an inline object based on content.
Table: css2 displays objects as block element-level tables.
Table-caption: css2 displays objects as table titles
Table-cell: css2 displays objects as table cells.
Table-column: css2 displays objects as table columns
Table-column-group: css2 displays objects as table column groups.
Table-header-group: css2 displays objects as table title groups.
Table-footer-group: css2 displays objects as table footer groups.
Table-row: css2 displays objects as table rows.
Table-row-group: css2 displays objects as table row groups.

==================================
Media types device type

media type
device type CSS version
Version compatibility
compatibility description
overview
All css2 ie4 + for all device types
aural css2 none for speech and music synthesizer
Braille css2 none for tactile feedback devices
embossed css2 none for convex Character (Braille) printed device
handheld css2 none for small or portable devices
Print css2 ie4 + for printers
projection css2 none for projection images, for example, slide
screen css2 ie4 + is used for Computer Display
tty css2 none is used for devices that use fixed-distance character grids. For example, telex typewriters and terminals
TV css2 none is used for TV devices

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.