<script language=javascript>
function test(oimg){
var owidth=oimg.width;
alert(owidth); //显示空白,显然是没有取对
}
</script><div style="overflow:auto;width:200;height:100">
<img src="" width="400" height="400" onclick="test(this)">
</div>
function test(oimg){
var owidth=oimg.width;
alert(owidth); //显示空白,显然是没有取对
}
</script><div style="overflow:auto;width:200;height:100">
<img src="" width="400" height="400" onclick="test(this)">
</div>
function test(oimg){
var owidth=oimg.width;
var oheight=oimg.height;
alert("宽度是:"+owidth+" 高度是:"+oheight); //显示空白,显然是没有取对
}
</script><div style="overflow:auto;width:200;height:100">
<img src="" width="400" height="200" onclick="test(this)">
</div>