社区
JavaScript
帖子详情
如何得到IE的版本号
chrisl80
2004-10-12 03:50:13
同标题
...全文
124
10
打赏
收藏
如何得到IE的版本号
同标题
复制链接
扫一扫
分享
转发到动态
举报
AI
作业
写回复
配置赞助广告
用AI写文章
10 条
回复
切换为时间正序
请发表友善的回复…
发表回复
打赏红包
梅雪香
2004-10-13
打赏
举报
回复
var isIesix=window.clientInformation.appVersion.indexOf("6.0");
if(isIesix==-1) 不是ie6
其它版本同理
BlueDestiny
2004-10-13
打赏
举报
回复
倒~
? :
相当于
if(){
}
else{
}
chrisl80
2004-10-13
打赏
举报
回复
?1:0;
这是什么意思
meizz
2004-10-13
打赏
举报
回复
var ver = window.navigator.appVersion;
alert(parseFloat(ver.substr(ver.indexOf("MSIE")+5))); //version
ttyp
2004-10-12
打赏
举报
回复
<SCRIPT LANGUAGE="JavaScript">
<!--
function checkBrowser()
{
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.mac=(this.ver.indexOf('Mac') > -1) ?1:0;
this.ope=(navigator.userAgent.indexOf('Opera')>-1);
this.ie=(this.ie6 || this.ie5 || this.ie4)
this.ns=(this.ns4 || this.ns5)
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns5 || this.ns4 || this.mac || this.ope)
this.nbw=(!this.bw)
return this;
}
var a = new checkBrowser();
if(a.ie6)
{
alert("是IE6");
}
//-->
</SCRIPT>
风斧
2004-10-12
打赏
举报
回复
参考这个
function checkBrowser(){
this.ver=navigator.appVersion
this.dom=document.getElementById?1:0
this.ie6=(this.ver.indexOf("MSIE 6")>-1 && this.dom)?1:0;
this.ie5=(this.ver.indexOf("MSIE 5")>-1 && this.dom)?1:0;
this.ie4=(document.all && !this.dom)?1:0;
this.ns5=(this.dom && parseInt(this.ver) >= 5) ?1:0;
this.ns4=(document.layers && !this.dom)?1:0;
this.mac=(this.ver.indexOf('Mac') > -1) ?1:0;
this.ope=(navigator.userAgent.indexOf('Opera')>-1);
this.ie=(this.ie6 || this.ie5 || this.ie4)
this.ns=(this.ns4 || this.ns5)
this.bw=(this.ie6 || this.ie5 || this.ie4 || this.ns5 || this.ns4 || this.mac || this.ope)
this.nbw=(!this.bw)
return this}
chrisl80
2004-10-12
打赏
举报
回复
我只想知道是IE5,还是IE6,怎么做
chrisl80
2004-10-12
打赏
举报
回复
返回的值是什么意思
jiangok2002
2004-10-12
打赏
举报
回复
window.clientInformation.appVersion
梅雪香
2004-10-12
打赏
举报
回复
var isIesix=window.clientInformation.appVersion.indexOf("6.0");
html判断IE版本
在这个例子中,当检测到IE版本小于等于8时,`<body>`元素会获得`.ie8-and-below`类,这样你可以通过CSS来为这些老版本的IE提供特别的样式支持。 此外,还可以使用条件注释来针对不同版本的IE提供特定的HTML代码,但...
获取IE浏览器的
版本号
的资源
然而,在某些情况下,尤其是维护旧项目或处理特定企业环境时,获取IE
版本号
仍然是必要的。 总结来说,获取IE浏览器
版本号
可以通过JavaScript的`navigator`对象、`User-Agent`字符串分析或者使用`ActiveXObject`。...
jQuery获得IE版本不准确webbrowser的解决方法
这段代码通过打开注册表的相应键值获取到IE的
版本号
,然后提取
版本号
的主数字,以获取准确的IE版本。 2. **使用标签强制解析** 另一个解决办法是使用标签中的"x-ua-compatible"来强制页面按特定的IE版本渲染。...
IE9_64位全量包
4. "9.0.8112.16421":这是IE9的
版本号
,每个部分都有特定含义,大
版本号
9表示是IE9,后面的数字可能代表更新和修复的次数。 5. "_1.exe":".exe"是可执行文件的扩展名,意味着这是一个可以直接运行的程序,而"_1...
javascript之IE版本检测超简单方法
将
版本号
转换为浮点数并赋值给`rv`,这样我们就
得到
了IE的版本信息。如果没有检测到IE,`rv`仍为-1。 有了`getIEVersion()`函数,我们可以创建`checkVersion()`函数来检查当前浏览器版本是否满足特定需求。在`...
JavaScript
87,997
社区成员
224,709
社区内容
发帖
与我相关
我的任务
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
分享
社区描述
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
近7日
近30日
至今
加载中
查看更多榜单
社区公告
暂无公告
试试用AI创作助手写篇文章吧
+ 用AI写文章