发布于 2015-04-18 02:59:48 | 160 次阅读 | 评论: 0 | 来源: 网友投递
JSP JAVA公司的WEB开发编程语言
JSP全名为Java Server Pages - java服务器页面是由Sun Microsystems公司倡导、许多公司参与一起建立的一种动态网页技术标准。JSP技术有点类似ASP技术,它是在传统的网页HTML(标准通用标记语言的子集)文件(*.htm,*.html)中插入Java程序段(Scriptlet)和JSP标记(tag),从而形成JSP文件,后缀名为(*.jsp)。
function printpage()
{
OpenWindow=window.open("", "_blank");
//重写网页
OpenWindow.document.write("<head>");
OpenWindow.document.write("<TITLE>打印报表</TITLE>");
OpenWindow.document.write("<link href="<%=basePath + "css/print.css"%>" rel="stylesheet" type="text/css" />");
OpenWindow.document.write("</head>");
OpenWindow.document.write("<BODY onload=‘window.print();‘>");
OpenWindow.document.write(document.getElementById(‘printcontent‘).innerHTML );
OpenWindow.document.write("</BODY>");
OpenWindow.document.write("</HTML>");
OpenWindow.document.close();
}
最后,添加打印按钮<input onclick="printpage();" type="button" value="打印汇总" />