为什么没有一个人来看看呢?

解决方案 »

  1.   

    问题出在你的 innerHTML +=  的时候引起了它里面的元素的重载而丢失了 value 值, 你可以再换一种方式, 比如下面这种:<html>
    <head>
    <script language="javaScript">
    function add()
    {
      var input = document.createElement("<input type=file name=fe>");
      document.getElementById("mm").appendChild(input);
      input = document.createElement("<input type=button name=del value=删除 onclick='dele(this)'>");
      document.getElementById("mm").appendChild(input);
    }function dele( e)
    {
      //var span = e.childNode;
      var f = e.previousSibling; 
      f.removeNode(true);
      e.removeNode(true);
    }
    </script>
    </head>
    <body>
    <form name="form1" action="" method="post">
    <span id=mm><input type=file name=ff><input type=button name=del value=删除 onclick="dele(this)"></span>
    <input type="button" name="sas" value="继续添加" onclick="add()">
    </form>
    </body>
    </html>