81,092
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<base href="<%=basePath%>">
<title>Test</title>
<link rel="stylesheet" type="text/css" href="css/panel.css">
<script type="text/javascript">
function print(){
printApplet.print();
alert("print...");
}
function preview(){
alert("preview begin");
printApplet.preview();
alert("preview...");
}
</script>
</head>
<body>
<APPLET id="printApplet" CODE = "PrintApplet.class" CODEBASE = "/test/reportClass" ARCHIVE = "jasperreports-applet-3.7.5.jar,commons-logging-1.0.4.jar,commons-collections-2.1.1.jar" WIDTH = "300" HEIGHT = "300"></XMP>
<PARAM NAME = CODE VALUE = "PrintApplet.class" >
<PARAM NAME = CODEBASE VALUE = "/test/reportClass" >
<PARAM NAME = ARCHIVE VALUE = "jasperreports-applet-3.7.5.jar,commons-logging-1.0.4.jar,commons-collections-2.1.1.jar" >
<PARAM NAME="type" VALUE="application/x-java-applet;version=1.2.2">
<PARAM NAME="scriptable" VALUE="false">
<PARAM NAME = "REPORT_URL" VALUE ="/test/servlet/PersonServlet">
</APPLET>
<button onclick="print();">打印</button><br>
<button onclick="preview();" >预览</button>
</body>
</html>