社区
JavaScript
帖子详情
如何得到IE的版本号
chrisl80
2004-10-12 03:50:13
同标题
...全文
115
10
打赏
收藏
如何得到IE的版本号
同标题
复制链接
扫一扫
分享
举报
写回复
配置赞助广告
10 条
回复
切换为时间正序
当前发帖距今超过3年,不再开放新的回复
发表回复
打赏红包
梅雪香
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");
相关推荐
get_ie_version.zip_屏幕取词 c++
得到
IE的
版本号
闭包和重写函数 返回IE浏览器
版本号
开发过程中我们有时候需要知道IE的
版本号
,我们知道
得到
IE的
版本号
的方法: 1 var v = 3, 2 div = document.createElement('div'), 3 all = div.getElementsByTagName('i'); 4 while ( 5 div.innerHTML = '<...
python设置端口控制ie浏览器_[Python爬虫] 之二:Selenium 调用IEDriverServer打开IE浏览器安装配置...
无论是selenium2(WebDriver)还是selenium2Library,如果想要调用ie浏览器,均需以下步骤。下载IEDriverServer。进入索引页,首先选择
版本号
,IEDriverServer的
版本号
和Selenium的
版本号
一定要一致,因为我选择的是selenium-3.30,所以IEDriverServer也选择的是3.30版本的。打开后的页面如下所示:解压缩
得到
IEDri...
if 判断语句来判断浏览器的类型和版本
if语句的代码的语法非常简单,就是一个 if 判断语句来判断浏览器的类型和版本,使用类似 和 语法结构包含起来,代表如果浏览器是 IE 并且
版本号
低于或等于 6.0 则进行提示。类似的语法还有: 这样使用IE浏览器(全部版本)的人都看
得到
。 这样IE 6.0版本会看
得到
,只限IE 6.0版本。 这样IE 6.0以下版本会看
得到
,不包含6.0。 这样IE 6.
获取IE浏览器的
版本号
的资源
获取IE浏览器的
版本号
获取IE浏览器的
版本号
获取IE浏览器的
版本号
获取IE浏览器的
版本号
发帖
JavaScript
JavaScript
Web 开发 JavaScript
复制链接
扫一扫
8.7w+
社区成员
22.4w+
社区内容
Web 开发 JavaScript
社区管理员
加入社区
获取链接或二维码
帖子事件
创建了帖子
2004-10-12 03:50
社区公告
暂无公告