在打印html时选择页面范围(Option for page range while printing html)
如果我有1000页的HTML可以提供页面范围选项,同时打印HTML? 在JavaScript中可能吗? (例如:打印页面100至200)
If i have 1000 pages of html can i provide option for page range while printing html? Is it possible in javascript? (Ex: print page 100 to 200)
最满意答案
将页面范围传递给本地打印对话框......不行。
您可以动态地使用您在打印样式表中定义的CSS类来打印您不想打印的部分...
<link rel="stylesheet" type="text/css" media="print" href="print.css" /> /* contents of print.css */ .noprint { display: none; }在调用window.print()之前,您必须弄清楚如何将该类放到HTML的相应位上。
Passing in a page range to the native print dialog... nope.
You could dynamically wrap the portions that you don't want to print with a CSS class that you've defined in a print stylesheet...
<link rel="stylesheet" type="text/css" media="print" href="print.css" /> /* contents of print.css */ .noprint { display: none; }You'll have to figure out how to get that class onto the appropriate bits of HTML before calling window.print().
更多推荐
html,页面,打印,page,HTML,电脑培训,计算机培训,IT培训"/> <meta name="descript
发布评论