要打印一部分可以这样http://blog.csdn.net/net_lover/archive/2004/07/06/35228.aspx

解决方案 »

  1.   

    少了一句。关闭document的输出。
    function print_table() { 
        if(!confirm("确定要打印列表吗?")) return;
        var stxt=document.all.indiv.innerHTML; 
        stxt = '<title>打印输出</title><link href="style.css" rel="stylesheet" type="text/css">' + stxt;
        var pwin=window.open("a.htm","print"); 
        pwin.document.write(stxt); 
        pwin.document.close();//这句很重要哦
        pwin.print(); 
    }