有人知道么?
我的代码如下:帮我看看有什么不对啊function printTable(obj,title,pageNum,pageSum){
try {
var pwin=window.open('test.htm');
pwin.document.write("<html><head>");
pwin.document.write("<link href=\"http://<%=request.getServerName()%>:<%=request.getServerPort()%><%System.out.println("++++++++"+request.getServerPort());%>/ZJWEB/css/style.css\" rel=\"stylesheet\" type=\"text/css\"></head><body>")
pwin.document.write("<object ID=\"WebBrowser1\" WIDTH=\"0\" HEIGHT=\"0\" CLASSID=\"CLSID:8856F961-340A-11D0-A96B-00C04FD705A2\"></object>");
pwin.document.write("\n<script LANGUAGE=javascript>\nfunction print(){\nWebBrowser1.ExecWB(7,1);}\n<"+"/script>");
pwin.document.write("\n<style media=print>\n.Noprint{display:none;}\n<"+"/style>");
pwin.document.write("<table><tr><td align=center width=1000><CENTER><h2>")
if (String(title)!='undefined')
{
  pwin.document.write(title)
}
pwin.document.write("</h2></CENTER></td>")
pwin.document.write("<td align=right width=20><h3>")
if (String(pageNum)!='undefined'&&String(pageNum)!='0'&&String(pageNum)!='')
{
     pwin.document.write(pageNum)
}
if (String(pageSum)!='undefined'&&String(pageSum)!='0'&&String(pageSum)!='')
{
   pwin.document.write("/"+pageSum)
}
pwin.document.write("</h3></td></tr></table>")
pwin.document.write("<table width=\"100%\"  border=\"0\" cellpadding=\"0\" cellspacing=\"0\">")
if (obj!=null)
{
  pwin.document.write(obj.outerHTML)
}
pwin.document.write("</table></body>")
pwin.document.write("\n<"+"script LANGUAGE=javascript>"+"\nprint();\nwindow.opener=null;\n \n<"+"/script>");
} catch(err) 
{
   document.writeln("c:javascript error,error name: " + err.name+" ---> ");
} finally 
{
}}