jsp

位置:IT落伍者 >> jsp >> 浏览文章

如何在JSP上放置兼容Firefox、IE、Chrome的applet


发布日期:2022年06月29日
 
如何在JSP上放置兼容Firefox、IE、Chrome的applet

pplet虽然已经基本上没人用了但是它还有一些应用场景的为了兼容性为了各个浏览器不能直接直接写<applet>标签最后考虑一下测试了几天最后还是写如下比较适合多个浏览器兼容希望对大家有所帮助

<%@page language="java" import="javautil*" pageEncoding="UTF"contentType="text/html; charset=utf"%><%//该写法兼容FirefoxIEChrome浏览器//applet加载类String appletClass = "cncompanskyframecqapprinterCQAPPrinterAppletclass";//依赖jar包目录String appletCodebase="applets";String appletJar = "commonsloggingjarcommonscollectionsjarjfreechartjarjcommonjar";int width = height = ;//查询参数String queryString = requestgetQueryString();if (queryString == null) {queryString = "";}queryString = "/otp/cqap/cqapprinterservletjsp?" + queryString;%><!DOCTYPE html PUBLIC "//WC//DTD XHTML Transitional//EN" "<html><head><meta httpequiv="XUACompatible" content="IE=EmulateIE" /><meta httpequiv="ContentType" content="text/html; charset=utf" /><title>打印</title></head><body><! 环境判断 ><!"CONVERTED_APPLET"><! CONVERTER VERSION ><SCRIPT LANGUAGE="JavaScript"><! var _info = navigatoruserAgent; var _ns = false; var _ie = (_infoindexOf("MSIE") > && _infoindexOf("Win") > && _infoindexOf("Windows ") < );//></SCRIPT><COMMENT><SCRIPT LANGUAGE="JavaScript"><! var _ns = (navigatorappNameindexOf("Netscape") >= && ((_infoindexOf("Win") > && _infoindexOf("Win") < && javalangSystemgetProperty("osversion")indexOf("") < ) || (_infoindexOf("Sun") > ) || (_infoindexOf("Linux") > )));//></SCRIPT></COMMENT><! applet展示 ><%<applet width= height=> <PARAM NAME=CODE VALUE="<%=appletClass%>"><PARAM NAME=CODEBASE VALUE="applets"><PARAM NAME=ARCHIVE VALUE="<%=appletJar%>"> <PARAM NAME="type" VALUE="application/xjavaapplet;version="> <PARAM NAME="scriptable" VALUE="false"> <PARAM NAME="REPORT_URL" VALUE ="<%=queryString%>"></applet>%><OBJECT classid="clsid:ADCEDBEFD"type="application/xjavabean;version="codebase="#Version="WIDTH="<%=width%>" HEIGHT="<%=height%>"><PARAM NAME=CODEBASE VALUE="<%=appletCodebase %>"><PARAM NAME=ARCHIVE VALUE="<%=appletJar%>"><PARAM NAME=CODE VALUE="<%=appletClass%>"><PARAM NAME="scriptable" VALUE="false"><PARAM NAME="REPORT_URL" VALUE="<%=queryString%>"><comment><EMBED type="application/xjavabean;version="pluginspage="CODE="<%=appletClass%>" CODEBASE="<%=appletCodebase %>"ARCHIVE="<%=appletJar %>"WIDTH="<%=width%>" HEIGHT="<%=height%>"REPORT_URL="<%=queryString%>" scriptable=false><noembed></noembed></EMBED></comment></OBJECT></body></html>

上一篇:JSP EL表达式详细介绍

下一篇:jsp连接MySQL操作GIS地图数据实现添加point的功能代码