window.print打印指定div实例代码

首先我们可以把要打印的内容放在div中,然后用下面的代码进行打印。

复制代码 代码如下:




div 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实例代码)