window.print打印指定div实例代码_javascript技巧
程序员文章站
2022-04-12 11:04:06
...
首先我们可以把要打印的内容放在div中,然后用下面的代码进行打印。
div print
//HTML Page
//Other content you wouldn't like to print
//Other content you wouldn't like to print
//Other content you wouldn't like to print
复制代码 代码如下:
//HTML Page
//Other content you wouldn't like to print
The Div content which you want to print
//Other content you wouldn't like to print
//Other content you wouldn't like to print
推荐阅读
-
window.print打印指定div实例代码_javascript技巧
-
js完美的div拖拽实例代码_javascript技巧
-
window.print打印指定div指定网页指定区域的方法_javascript技巧
-
js实现页面打印功能实例代码(附去页眉页脚功能代码)_javascript技巧
-
JavaScript:Div层拖动效果实例代码_javascript技巧
-
JavaScript删除指定子元素代码实例_javascript技巧
-
JavaScript:Div层拖动效果实例代码_javascript技巧
-
JavaScript删除指定子元素代码实例_javascript技巧
-
div当滚动到页面顶部的时候固定在顶部实例代码_javascript技巧
-
window.print打印指定div实例代码_javascript技巧