将这段js代码添加到你的网页文件中就可以强制要求ie6缓存css背景图片了。 try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
让Firefox支持innerText
<script language="javascript">
function isIE(){ //ie?
if (window.navigator.userAgent.toLowerCase().indexOf("msie")>=1)
return true;
else
return false;
}
if(!isIE()){ //firefox innerText define
HTMLElement.prototype.__defineGetter__("innerText",
function(){
var anyString = "";
var childS = this.childNodes;
for(var i=0; i<childS.length; i++) {
Webjx.Com
if(childS[i].nodeType==1)
//anyString += childS[i].tagName=="BR" ? "/n" : childS[i].innerText;
anyString += childS[i].innerText;
else if(childS[i].nodeType==3)
anyString += childS[i].nodeValue;
}
return anyString;
}
);
HTMLElement.prototype.__defineSetter__("innerText",
function(sText){
this.textContent=sText;
}
);
}
</script>