请问pixelWidth为什么取不出值
<html>
<body id= "b ">
<input type= "text " id=txt value= " " style= "width:100px ">
<img id= "i " src= "文章前图.gif " style= "position:absolute;width:100px; "/>
<script language=javascript>
<!--
function a()
{
document.all[ "txt "].value=document.all[ "i "].pixelWidth+ " ";
}
document.getElementById( "b ").onmousemove=a;
//-->
</script>
</body>
</html>
为什么这里文本框显示为 "undefined ",而不显示100
------解决方案--------------------那也得是
document.all[ "i "].style.pixelWidth+ " "