<html>
<head>
<title>判斷ie版本並給出提示升級瀏覽器</title>
</head>
<style type="text/css">
#ie6-warning{
background:rgb(255,255,225) url("/upload/201006/20100628012515690.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>
<body>
<!--[if lte ie 6]>
<div id="ie6-warning">您正在使用 internet explorer 6,在本頁面的顯示效果可能有差異。 建議您升級到 <a href="HTTP://www.microsoft.com/china/windows/internet-explorer/" target="_blank">internet explorer 8</a> 或以下瀏覽器: <a href="HTTP://www.mozillaonline.com/">firefox</a> / <a href="HTTP:// www.google.com/chrome/?hl=zh-cn">chrome</a> / <a href="HTTP://www.apple.com.cn/safari/">safari< /a> / <a href="HTTP://www.operachina.com/">opera</a>
</div>
<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]-->
</body>
</html>