JSP上放置兼容Firefox、IE、Chrome的applet
来源:互联网 发布:遮挡号牌神器 淘宝 编辑:程序博客网 时间:2024/05/01 11:17
pplet虽然已经基本上没人用了。但是它还有一些应用场景的,为了兼容性。为了各个浏览器,不能直接直接写<applet>标签,最后考虑一下测试了几天,最后还是写如下比较适合多个浏览器兼容,希望对大家有所帮助
<%@page language="java" import="java.util.*" pageEncoding="UTF-8"contentType="text/html; charset=utf-8"%><%//该写法兼容Firefox、IE、Chrome浏览器//applet加载类String appletClass = "cn.com.pansky.frame.cqap.printer.CQAPPrinterApplet.class";//依赖jar包目录String appletCodebase="applets";String appletJar = "commons-logging-1.1.1.jar,commons-collections-2.1.1.jar,jfreechart-1.0.12.jar,jcommon-1.0.15.jar";int width = 300, height = 200;//查询参数String queryString = request.getQueryString();if (queryString == null) {queryString = "";}queryString = "/otp/cqap/cqap-printer.servlet.jsp?" + queryString;%><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8" /><meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>打印</title></head><body><!-- 环境判断 --><!--"CONVERTED_APPLET"--><!-- CONVERTER VERSION 1.1 --><SCRIPT LANGUAGE="JavaScript"><!-- var _info = navigator.userAgent; var _ns = false; var _ie = (_info.indexOf("MSIE") > 0 && _info.indexOf("Win") > 0 && _info.indexOf("Windows 3.1") < 0);//--></SCRIPT><COMMENT><SCRIPT LANGUAGE="JavaScript1.1"><!-- var _ns = (navigator.appName.indexOf("Netscape") >= 0 && ((_info.indexOf("Win") > 0 && _info.indexOf("Win16") < 0 && java.lang.System.getProperty("os.version").indexOf("3.5") < 0) || (_info.indexOf("Sun") > 0) || (_info.indexOf("Linux") > 0)));//--></SCRIPT></COMMENT><!-- applet展示 --><%--<applet width=460 height=160> <PARAM NAME=CODE VALUE="<%=appletClass%>"><PARAM NAME=CODEBASE VALUE="applets"><PARAM NAME=ARCHIVE VALUE="<%=appletJar%>"> <PARAM NAME="type" VALUE="application/x-java-applet;version=1.2.2"> <PARAM NAME="scriptable" VALUE="false"> <PARAM NAME="REPORT_URL" VALUE ="<%=queryString%>"></applet>--%><OBJECT classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93"type="application/x-java-bean;version=1.1.2"codebase="http://java.sun.com/products/plugin/1.1.2/jinstall-112-win32.cab#Version=1,1,2,0"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/x-java-bean;version=1.1.2"pluginspage="http://java.sun.com/products/plugin/1.1.2/plugin-install.html"CODE="<%=appletClass%>" CODEBASE="<%=appletCodebase %>"ARCHIVE="<%=appletJar %>"WIDTH="<%=width%>" HEIGHT="<%=height%>"REPORT_URL="<%=queryString%>" scriptable=false><noembed></noembed></EMBED></comment></OBJECT></body></html>
- JSP上放置兼容Firefox、IE、Chrome的applet
- 兼容IE-FireFox-Chrome的背景音乐播放
- 兼容IE-FireFox-Chrome的背景音乐播放
- pasteHTML兼容ie,firefox,chrome
- FLASH兼容IE FireFox Chrome
- 兼容ie,firefox,chrome的跨域加载js脚本
- 兼容firefox、chrome、ie的wmp网页播放器代码
- 兼容IE,FireFox,Chrome主流的文字阴影功能。
- 兼容IE、FireFox、Chrome等浏览器的xml处理函数
- 全兼容ie chrome firefox 的 windows media play 示例
- IE、Firefox、Chrome 的JS代码兼容注意事项
- iframe框架取值兼容ie/firefox/chrome的写法
- event 兼容调用(IE,Firefox,Chrome)
- js操作select 兼容ie、chrome、Firefox
- 回到顶部代码,兼容IE CHROME FIREFOX
- pasteHTML兼容ie,firefox,chrome等浏览器
- 兼容IE,google,firefox的键盘上一张下一张.
- 禁用键盘上的指定键 兼容iE、Chrome、火狐
- web debugger fiddler 使用小结
- 完美适应iOS中的键盘高度变化
- hdu 4414
- Photoshop小技巧集锦八十条
- Android调用系统内部的下载程序下载文件(一)
- JSP上放置兼容Firefox、IE、Chrome的applet
- 成都传智播客java基础班大优惠啦~~~!!!
- 我的笔记本维护备忘
- socket
- 谈谈信令风暴
- 《C#入门到精通》学习笔记 -- 垃圾回收过程
- andorid流量测试方法
- Flex4之皮肤定制【Skin类和Skin类】
- 安卓手机更换字体导致手机无限重启,不想刷机,完美解决历程