你可以用try{x = new AcriveXObject("xxx.versionxxx")
}进行判断
}进行判断
解决方案 »
- 这个树状菜单怎么来切换?
- Win2000下运行以下代码,IE6自动关闭,求解决办法
- 小女刚学js.迷茫中。。。求大牛赐教。。。题目越长越好,越长越好,越长越好,越长越好,越长越好,越长越好,越长越好,越长越好,越长越好,越长越好,越长越好。。。
- 谁能详细说明一下execcommend的详细用法
- 关于IFRAME 中锚的跳转
- 请问;怎么在调用函数时使用字符窜组合变量???
- 当关闭浏览器(正常关闭或异常关闭)时,必需执行一个操作
- CSDN的高手们,给个答案阿!!-----在线等待,急用
- 請告訴的我window.iframename.location.href=url在IE5中的替代方法?
- jQuery POST请求报错
- 如何获取com中的返回植
- 很方便回答的问题!快来给分了!
return (typeof property != 'undefined');
}var flashVersion = 0;
function getFlashVersion() {
var latestFlashVersion = 8;
var agent = navigator.userAgent.toLowerCase();
// NS3 needs flashVersion to be a local variable
if (agent.indexOf("mozilla/3") != -1 && agent.indexOf("msie") == -1) {
flashVersion = 0;
}
// NS3+, Opera3+, IE5+ Mac (support plugin array): check for Flash plugin in plugin array
if (navigator.plugins != null && navigator.plugins.length > 0) {
var flashPlugin = navigator.plugins['Shockwave Flash'];
if (typeof flashPlugin == 'object') {
for (var i = latestFlashVersion; i >= 3; i--) {
if (flashPlugin.description.indexOf(i + '.') != -1) {
flashVersion = i;
break;
}
}
}
} // IE4+ Win32: attempt to create an ActiveX object using VBScript
else if (agent.indexOf("msie") != -1 && parseInt(navigator.appVersion) >= 4 && agent.indexOf("win")!=-1 && agent.indexOf("16bit")==-1) {
var doc = '<scr' + 'ipt language="VBScript"\> \n';
doc += 'On Error Resume Next \n';
doc += 'Dim obFlash \n';
doc += 'For i = ' + latestFlashVersion + ' To 3 Step -1 \n';
doc += ' Set obFlash = CreateObject("ShockwaveFlash.ShockwaveFlash." & i) \n';
doc += ' If IsObject(obFlash) Then \n';
doc += ' flashVersion = i \n';
doc += ' Exit For \n';
doc += ' End If \n';
doc += 'Next \n';
doc += '</scr' + 'ipt\> \n';
document.write(doc);
}
// WebTV 2.5 supports flash 3
else if (agent.indexOf("webtv/2.5") != -1) flashVersion = 3; // older WebTV supports flash 2
else if (agent.indexOf("webtv") != -1) flashVersion = 2; // Can't detect in all other cases
else {
flashVersion = flashVersion_DONTKNOW;
} return flashVersion;
}flashVersion_DONTKNOW = -1;