浏览器的兼容性

下面在代码在IE和其他浏览器中分别有不同的表现:

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>
</head>
<body>
<!--[if IE 6]>
It will only be displayed in IE 6 <br>
<![endif]-->

<!--[if lte IE 7]>
This content could be displayed in IE 7 or earlier.
"ite" means "less than or equal", you can also use "lt", "gt" or "gte" <br>
<![endif]-->

<!--[if IE]>
This content could be displayed in all IE browser. <br>
<![endif]-->

<!--[if !IE]><-->
This is normal html content, but IE will not display it. <br>
<!--><![endif]-->

This is normal content, displayed by all browsers. <br>

<script type="text/javascript">
/*@cc_on
@if (@_jscript)
//IE will exec it, but other browser will not.
alert('You are using IE.');
@else*/
//Other browser will exec it, but others will not.
alert('You are not using IE.');
/*@end
@*/
</script>
</body>
</html>

但是测试表明: IE11和 Firefox、chrome有完全相同的表现


介绍几款浏览器兼容性测试工具:
1.IETester
IETester是一个免费的Web浏览器调试工具,可以模拟出不同的js引擎来帮助程序员设计效果统一的代码。IETester可以在独立的标签页中开启IE5.5、IE6、IE7,IE8 beta2这4个不同版本的IE。可以方便的解决IE浏览器的兼容问题。
官网网站:http://www.my-debugbar.com/wiki/IETester/HomePage

2.SuperPreview
微软提供的工具
http://www.microsoft.com/zh-cn/download/details.aspx?id=2020

3.Browsershots
还是一个在线测试工具,支持很多浏览器。
相对前几个测试工具,个人感觉这个显得稍微逊色了一些。
使用地址:http://browsershots.org/
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值