<script type="text/javascript">
window.οnlοad=function(){
var oDiv=document.getElementById("oDiv")
//alert(oDiv.currentStyle.height)//400px 只适用于ie
/*var s=getComputedStyle(oDiv,null)alert(s.height)//400px 适合w3c*/
alert(getRealStyle(oDiv,"backgroundColor"))
function getRealStyle(obj,s){
var style;if(window.getComputedStyle){ //W3C
style=window.getComputedStyle(obj,null)
}else if(obj.currentStyle){ //ie
style=obj.currentStyle
}
return style[s]
}
}
</script>