| |

VerySource

 Forgot password?
 Register
Search
View: 11|Reply: 3

About printing

[Copy link]

2

Threads

10

Posts

7

Credits

Newbie

Rank: 1

Credits
7

 China

Post time: 2020-3-4 07:30:01
| Show all posts |Read mode
javascript
How to print in landscape orientation?
Header and footer are not printed, only a part of the page is printed.
Grateful
Reply

Use magic Report

0

Threads

52

Posts

38

Credits

Newbie

Rank: 1

Credits
38

 China

Post time: 2020-5-16 11:15:01
| Show all posts
function PreviewReferralPrint ()
            {
                 bdhtml = window.document.body.innerHTML;
                 sprnstr = "<!-startprint->";
                 eprnstr = "<!-endprint->";
                 prnhtml = bdhtml.substr (bdhtml.indexOf (sprnstr) +17);
                 prnhtml = prnhtml.substring (0, prnhtml.indexOf (eprnstr));
                 window.document.body.innerHTML = prnhtml;
                 window.print ();
                 window.parent.returnValue = '0'; window.parent.close ();
            }

<!-startprint->
Write the HTML to be printed here
<!-endprint->
Reply

Use magic Report

1

Threads

5

Posts

6

Credits

Newbie

Rank: 1

Credits
6

 China

Post time: 5 day(s) ago
| Show all posts
Awesome
Reply

Use magic Report

2

Threads

10

Posts

7

Credits

Newbie

Rank: 1

Credits
7

 China

 Author| Post time: Yesterday 23:30
| Show all posts
Is there a way
Print a part of this page without popping up a new page?
(Is it a bit demanding)
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2020|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list