js的web页面打印,简单的话就是:
    window.print(); //ms的web browser activex没那么方便

关于打印样式css的指定:

// 设置打印机用字体尺寸
@media print 
{
@import "print.css"
BODY {font-size
:8pt;}


或者

<link rel="stylesheet"
   type="text/css"
   media="print" href="print.css" />

打印指定frame(或iframe)语法:

parent.framename.focus();
parent.framename.print();

//如果打印隐藏的iframe,不可设置display:none(如此打印不到),要设置iframe的width和height为0px即可

关于js打印及预览的资源见:

    css design:going to print
    print to preview
    print a page

相关文章:

  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2021-07-23
  • 2022-01-23
  • 2022-12-23
  • 2021-12-12
猜你喜欢
  • 2021-12-12
  • 2021-12-12
  • 2021-12-12
  • 2022-12-23
  • 2022-12-23
  • 2021-12-12
相关资源
相似解决方案