0
我正在使用jquery插件来打印我的网页的特定div。它在Firfox和IE中工作正常。但不幸的是,它不适用于Google Chrome。实际上谷歌浏览器正在打印包括横幅,菜单和按钮的完整网页。我无法解决这个问题。Google chrome打印问题
这里是我的示例代码
Java脚本
$(function() {
$("input:button").click(function() {
$("#print").printThis();
});
});
HTML
<body>
<input type="button" value="print" />
<div id="print">
this is print area, it can be everything. this is print area, it can be everything. this is print area, it can be everything. this is print area, it can be everything. this is
</div>
</body>
这将有助于知道您使用的是哪个插件。无论如何,在大多数情况下,使用CSS来定义可打印区域是最容易的,除非您打算在打印整个页面的同时提供单独的打印部分。 – JJJ