检查IE6 友好提示

分类:Javascript| 发布:camnprbubuol| 查看: | 发表时间:2012/5/14

<!--[if lte IE 6]>
<div id="ie6-warning">您正在使用 Internet Explorer 6,在本页面的显示效果可能有差异。建议您升级到 <a href="http://camnpr.com/upload/2012/5/201205141630240150.gif") no-repeat scroll 3px center;
position:absolute;
top:0;
left:0;
font-size:12px;
color:#333;
width:97%;
padding: 2px 15px 2px 23px;
text-align:left;
}
#ie6-warning a {
text-decoration:none;
}
</style> <script type="text/javascript">
function position_fixed(el, eltop, elleft){
// check if this is IE6
if(!window.XMLHttpRequest)
window.onscroll = function(){
el.style.top = (document.documentElement.scrollTop + eltop)+"px";
el.style.left = (document.documentElement.scrollLeft + elleft)+"px";
}
else el.style.position = "fixed";
}
position_fixed(document.getElementById("ie6-warning"),0, 0);
</script>
<![endif]-->

365据说看到好文章不转的人,服务器容易宕机
原创文章如转载,请注明:转载自郑州网建-前端开发 http://camnpr.com/
本文链接:http://camnpr.com/archives/570.html