有一个html网页,如何打印html的某块区域?

图片说明

可以使用这个jquery局部打印插件。http://www.cnblogs.com/zhangs1986/p/3719396.html

用printarea
代码调用

 <%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.*"%>
<html>
    <head>
        <title></title>
    </head>
    <script type="text/javascript" src="jquery-1.4.3.js"></script>
    <script type="text/javascript" src="jquery.PrintArea.js"></script>
    <body>
        <input id="btnPrint" type="button" value="打印"/>
        <div id="myPrintArea">
            在这里放你要打印的内容
        </div>
    </body>
    <script type="text/javascript">
        $(function(){
            //打印
            $("#btnPrint").bind("click",function(event){
                $("#myPrintArea").printArea();
            });
        });
    </script>
</html>

css print样式可以控制打印的区域,非打印区域隐藏起来
http://blog.csdn.net/wyaspnet/article/details/6436368