我想只打印我页面的某些部分.我的示例代码如下:
<%@ page contentType="text/html;charset=ISO-8859-1" %>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
<title>Insert title here</title>
</head>
<body>
<div class="body">
Blah... blah...
</div>
<div class="printable">
contents goes here...
</div>
</body>
</html>
Run Code Online (Sandbox Code Playgroud)
我需要打印的内容<div class="printable"></div>.是否可以使用jQuery执行此操作?我应该编写这个解决方案,还是有一个插件可以帮助解决这个问题?