<html> <head> <title>判断IE版本并给出提示升级浏览器</title> </head> <mce:style type="text/css"><!-- #ie6-warning{ background:rgb(255,255,225) url("/jscss/demoimg/201006/warning.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; } --></mce:style><style type="text/css" mce_bogus="1"> #ie6-warning{ background:rgb(255,255,225) url("/jscss/demoimg/201006/warning.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/" mce_href="http://www.microsoft.com/china/windows/internet-explorer/" target="_blank">Internet Explorer 8</a> 或以下浏览器: <a href="http://www.mozillaonline.com/" mce_href="http://www.mozillaonline.com/">Firefox</a> / <a href="http://www.google.com/chrome/?hl=zh-CN" mce_href="http://www.google.com/chrome/?hl=zh-CN">Chrome</a> / <a href="http://www.apple.com.cn/safari/" mce_href="http://www.apple.com.cn/safari/">Safari</a> / <a href="http://www.operachina.com/" mce_href="http://www.operachina.com/">Opera</a> </div> <mce: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); // --></mce:script> <![endif]--> </body> </html>