可以啊....用id来控制name的变化
<input type="button" value="change" onclick="document.all.test.name=document.all.test.name+'a';alert(document.all.test.name)">
<input name="hello" id="test">

解决方案 »

  1.   

    但是用新name得不到控件引用啊?
      

  2.   

    这样就行了.<input type="button" value="change" onclick="change()">
    <input name="hello" value="hello">
    <input type="button" onclick="alert(document.all.newname.value)"> 
    <script>
    function change()
    {
        var s=document.all.hello.outerHTML;
        s=s.replace("name=hello","name=newname");
        document.all.hello.outerHTML=s;
    }
    </script>