swf 嵌入 jsp 中
发布时间:2020-12-15 07:04:14 所属栏目:百科 来源:网络整理
导读:script language="javascript"var LocString = String(window.document.location.href);function getQueryStr(str) {var rs = new RegExp("(^|)" + str + "=([^]*)(|$)","gi").exec(LocString),tmp;if (tmp = rs) {return tmp[2];}// parameter cannot be
<script language="javascript"> var LocString = String(window.document.location.href); function getQueryStr(str) { var rs = new RegExp("(^|)" + str + "=([^&;]*)(&;|$)","gi") .exec(LocString),tmp; if (tmp = rs) { return tmp[2]; } // parameter cannot be found return ""; } function getContextPath() { var contextPath = ""; var path = window.location.pathname; contextPath = path.substring(0,path.indexOf('/',1)); return contextPath; } var flashvars = {}; //*********************************************************************// flashvars.isTempTable = "true"; flashvars.remoteServer = window.location.hostname; flashvars.remotePort = window.location.port; flashvars.server = window.location.hostname+":"+window.location.port; flashvars.remoteWebcontext = "grm"; flashvars.webcontext = getContextPath(); flashvars.flashFilePath = "/project/designer/tag"; //*********************************************************************// var actParam = ""; flashvars.activityParams = actParam; var params = {}; params.allowscriptaccess = "always"; params.menu = "false"; params.wmode = "transparent"; var attributes = {}; attributes.id = "bpmn_tag"; //判断浏览器类型和版本 返回结果:浏览器名_版本eg:ie_9.0; firefox_24; chrome_30; function isBrowser(){ var result; var Sys={}; var ua=navigator.userAgent.toLowerCase(); var s; (s=ua.match(/msie ([d.]+)/))?Sys.ie=s[1]: (s=ua.match(/firefox/([d.]+)/))?Sys.firefox=s[1]: (s=ua.match(/chrome/([d.]+)/))?Sys.chrome=s[1]: (s=ua.match(/opera.([d.]+)/))?Sys.opera=s[1]: (s=ua.match(/version/([d.]+).*safari/))?Sys.safari=s[1]:0; if(Sys.ie){//Js判断为IE浏览器 result="ie_"+Sys.ie; } if(Sys.firefox){//Js判断为火狐(firefox)浏览器 result="firefox_"+Sys.firefox; } if(Sys.chrome){//Js判断为谷歌chrome浏览器 result="chrome_"+Sys.chrome; } if(Sys.opera){//Js判断为opera浏览器 result="opera_"+Sys.opera; } if(Sys.safari){//Js判断为苹果safari浏览器 result="safari_"+Sys.safari; } return result; } var browseStr = isBrowser(); if(browseStr.indexOf("ie")!=-1){ var expressInstallSwfurl = "<%=request.getContextPath()%>/flex_resources/playerProductInstall.swf" swfobject.embedSWF("<%=request.getContextPath()%>/flex_resources/Systemtopology.swf","bpmn_tag_content","100%","85%","10.0.0",expressInstallSwfurl,flashvars,params,attributes); }else{ var expressInstallSwfurl = "<%=request.getContextPath()%>/flex_resources/playerProductInstall.swf" swfobject.embedSWF("<%=request.getContextPath()%>/flex_resources/Systemtopology.swf","50%",attributes); } </script> (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |