Removing page title and date when printing web page (with CSS?)

后端 未结 7 721
一个人的身影
一个人的身影 2020-11-29 01:31

By default, when you print a web page, the page title and and URL are printed at the top of the page, and likewise the date

7条回答
  •  醉话见心
    2020-11-29 02:28

    completing Kai Noack's answer, I would do this:

    var originalTitle = document.title;
    document.title = "Print page title";
    window.print();
    document.title = originalTitle;
    

    this way once you print page, This will return to have its original title.

提交回复
热议问题