61,110
社区成员
发帖
与我相关
我的任务
分享
<html>
<head>
<style>
.IEbug
{
background:yellow;
width:100px;
height:100px;
left:200px;
top:300px;
}
</style>
</head>
<body>
<div class="IEbug">
<p>ADLADLFADFJEOFAJDFEOEFDDSAFEASD</p>
</div>
<script>
onload=function(){
var a=document.getElementsByTagName("div")[0];
alert(window.getComputedStyle ? window.getComputedStyle(a, null).width : a.currentStyle.width);
alert(window.getComputedStyle ? window.getComputedStyle(a, null).height : a.currentStyle.height);
}
</script>
</body>
</html>