<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"].width+"";
}
document.getElementById("b").onmousemove=a;
//-->
</script>
</body>
</html>