IE6的各种不足就不多说了,这个老人已经在互联网的世界上存活太长时间了,现在是他退休的时候了。
加速IE6的死亡,人人有责。
所以就有了下面这一段不太标准的js代码。这段代码不支持Mozilla系列。
[javascript]
var stopie6 = function(){
var divhtml = "";
divhtml += '
<div id="mark_all" style="background-color:#666;">
</div>
<div id="mark_div" style="margin:-200px 0 0 -250px;">
<img src="http://catcoder.com/webtools/stopie6/stopie.jpg" width="500" height="400" />
</div>
';
var creatediv = document.createElement("div");
creatediv.id = "div_mark";
creatediv.innerHTML = divhtml;
document.body.appendChild(creatediv);
}
var isIE6=true;
if(!window.XMLHttpRequest){
isIE6 = true;
}
if(isIE6){
window.attachEvent("onload",stopie6);
}
function closediv(){
document.getElementById("mark_all").style.display="none";
document.getElementById("mark_div").style.display="none";
}
document.body.style.width = "100%";
document.body.style.height = "100%";[/javascript]
这段代码原本是为了警告IE6的用户,到最后还得为了兼容IE6做了一些努力。
引用则很简单,在自己的blog里面的页脚地方加入:
[javascript]<script src="http://catcoder.com/webtools/stopie6/stopie6.js" language="javascript"></script>[/javascript]
浏览器是进入享受现在网络生活的第一个门槛,不用让古老的IE6减少了网络的乐趣。
