有时候我们要判断用户的浏览器是否符合我们页面的运行标准,比如IE的版本太低,就无法正常运行界面,这个时候我们就要提醒用户更换浏览器或者下载别的浏览器。
常见的判断语句
<!--[if !IE]><!--> 除IE外都可识别 <!--<![endif]-->
<!--[if IE]> 所有的IE可识别 <![endif]-->
<!--[if IE 6]> 仅IE6可识别 <![endif]-->
<!--[if lt IE 6]> IE6以及IE6以下版本可识别 <![endif]-->
<!--[if gte IE 6]> IE6以及IE6以上版本可识别 <![endif]-->
<!--[if IE 7]> 仅IE7可识别 <![endif]-->
<!--[if lt IE 7]> IE7以及IE7以下版本可识别 <![endif]-->
<!--[if gte IE 7]> IE7以及IE7以上版本可识别 <![endif]-->
<!--[if IE 8]> 仅IE8可识别 <![endif]-->
<!--[if IE 9]> 仅IE9可识别 <![endif]-->
代码实例:
<!doctype html>
<!--[if lt IE 9]>
<script type="text/javascript">
alert('浏览器版本过低,正在跳转ing');
</script>
<![endif]-->
<html>
.....
更多:http://www.cnblogs.com/thinkingthigh/archive/2013/06/19/3144239.html