html、jquery判断浏览器,导入不同的css文件
2012-05-18 17:09
155 查看
浏览器是IE6,加载ie6.css;浏览器是IE7及以上版本,加载ie7.css;浏览器非IE,加载notIEcss.css。
<link href="index2/style2.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]><link href="index2/ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
<!--[if gte IE 7]><link href="index2/ie7.css" rel="stylesheet" type="text/css" /><![endif]-->
<link href="#" id="notIEcssId" rel="stylesheet" type="text/css"/>
<script type="text/javascipt" >
$(document).ready(function(){
//如果浏览器不是ie,加载notIEccss文件
if( ! $.browser.msie) {
$("#notIEcssId").attr("href","notIEcss.css");
});
</script>
参考资料:http://www.poluoluo.com/jzxy/201110/145284.html
<link href="index2/style2.css" rel="stylesheet" type="text/css" />
<!--[if IE 6]><link href="index2/ie6.css" rel="stylesheet" type="text/css" /><![endif]-->
<!--[if gte IE 7]><link href="index2/ie7.css" rel="stylesheet" type="text/css" /><![endif]-->
<link href="#" id="notIEcssId" rel="stylesheet" type="text/css"/>
<script type="text/javascipt" >
$(document).ready(function(){
//如果浏览器不是ie,加载notIEccss文件
if( ! $.browser.msie) {
$("#notIEcssId").attr("href","notIEcss.css");
});
</script>
参考资料:http://www.poluoluo.com/jzxy/201110/145284.html
相关文章推荐
- Jquery判断不同的浏览器
- jquery 不同浏览器判断颜色值的方法
- jquery 不同浏览器判断颜色值的方法
- js,onblur后下一个控件获取焦点判断、html当前活跃控件、jquery版本查看、jquery查看浏览器版本、setTimeout&setInterval
- JQuery 判断不同浏览器
- 使用JQuery 区分判断 不同内核的浏览器
- 在浏览器里判断设备来源,跳转到不同的App下载页JS
- HTML条件注释判断浏览器版本命令总结
- 如何用js判断不同浏览器
- jquery在不同浏览器下的兼容性问题
- jquery 判断浏览器方法
- JQuery和IE条件表达式判断浏览器
- jquery判断浏览器后退时候弹出消息的方法
- 【用jQuery来判断浏览器的类型】及【javascript获取用户ip地址】
- JQUERY 浏览器判断实现函数
- Jquery判断浏览器类型
- jquery判断当前浏览器的实现代码
- 一个jquery在不同浏览器下的兼容性问题。
- JS判断浏览器类型和屏幕分辨率来调用不同的CSS样式
- 判断浏览器canvas支持与否中jquery和getContext()方法的之间的调用问题