本帖最后由 yangyang87101 于 2010-02-12 18:20:58 编辑

解决方案 »

  1.   

    function tags() 
      { 
        var s="";
        for (i = 2; i < 30; i++) { 
          s = s+document.all["+i+"].value; 
        } 
       document.all["bar"].value=s

      

  2.   

    <input type="text" name="abc" id="bar"/> <br /> <input type="text" name="abc" id="3" onkeyup="tags();"/> 
    <input type="text" name=abc"" id="2" onkeyup="tags();"/> 
    <input type="text" name="abc" id="4" onkeyup="tags();"/> 
    <input type="text" name=abc"" id="5" onkeyup="tags();"/> 
    <input type="text" name="abc" id="6" onkeyup="tags();"/> 
    <input type="text" name="abc" id="7" onkeyup="tags();"/> function ff()
    {
        var s = "";
        for(var i=0; i<document.all.abc.length; i++)
        {
             s+=document.all.abc[i].value;
        }
        return s;
    }
      

  3.   

    document.all["bar"].value = document.all["+i+"].value+document.all["bar"].value += document.all["+i+"].value
      

  4.   

    不要用document.all了用document.getElementById吧