<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html>
<head>
<title>Untitled</title>
<Script language="javascript">
<!--
function insert_row(){ 
document.all.ABC.innerHTML ="<input type='text'  value='aaa' >"; 
         //为了方便观察改成了text,改回hidden就可以了。
}//-->
</Script>
</head>
<body>
<center>
<input type="button" value="ADD" onclick="insert_row()"> 
<div id="ABC">おはよう</div></center>
</body>
</html>

解决方案 »

  1.   

    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
    <title>无标题文档</title>
    </head><body>
    </body>
    </html>
    <SCRIPT LANGUAGE="JavaScript">
    <!--
    var input = document.createElement("input");
    input.type = "text"; //改成这样好测试效果,请修改成hidden;
    input.name = "type";
    input.value = "aaa";
    document.documentElement.lastChild.appendChild(input);
    //-->
    </SCRIPT>
      

  2.   

    其实我的现在的情况是不能修改form的html部分的。我意思是能不能用象:
    javascript:
    ... new Element ...之类的。
    我觉得这应该可以实现,就是不知该怎么写。
      

  3.   

    没有new Element这样的语法,只有通过document.createElement来添加。