把这个font换成img就可以了
<SCRIPT LANGUAGE="JavaScript">
<!--
function go()
{
document.body.insertAdjacentHTML("AfterBegin","<font id='inserimg' color=red>-beforeBegin-<font>");
inserimg.style.position = "absolute";
inserimg.style.left = document.all.x.value;
inserimg.style.top = document.all.y.value;
}
//-->
</SCRIPT><body>
<div id='divid'></div>
x:<INPUT TYPE="text" NAME="x" value='200'>
y:<INPUT TYPE="text" NAME="y" value='300'>
<INPUT TYPE="button" NAME="go" value='go' onclick="go();">
</body>

解决方案 »

  1.   

    直接用window.write写出,只是放于<div> 中来定位,应该就可以了。
      

  2.   

    <SCRIPT LANGUAGE="JavaScript">
    <!--
    function go()
    {
    var image=document.createElement("IMG");
    image.style.position="absolute";
    image.style.left=document.all.x.value;
    image.style.top=document.all.y.value;
    document.body.insertAdjacentElement("AfterBegin",image);
    }
    //-->
    </SCRIPT><body>
    x:<INPUT TYPE="text" NAME="x" value='200'>
    y:<INPUT TYPE="text" NAME="y" value='300'>
    <INPUT TYPE="button" NAME="go" value='go' onclick="go();">
    </body>
      

  3.   

    chouchy(城市刀客) 用的方法更好,我忘记createElement方法了,学习