document.getElementById().xxxx括号里写对应的id值
<input type="text" id="name" name="name" maxLength="15" size="20>
document.getElementByName().xxxx

解决方案 »

  1.   

    你的所有标签都没有id 你getElementById当然没有
      

  2.   

    <form action="" method="post" id="ab">
    document.getElementById
    你的全都是name,怎么能取得到值
      

  3.   

    汗,你全部用的name属性,document.getElementsByName("name")[0].value
    要么设置 属性id="name";
      

  4.   

    补充:var   input   =   document.createElement("<input   name='test1'></input>");   
      Name属性必须特殊对待,只要如此创建就能找到了。   
        
      MSDN原文如此:   
      Attributes   can   be   included   with   the   sTag   as   long   as   the   entire   string   is   valid   HTML.   You   should   do   this   if   you   wish   to   include   the   NAME   attribute   at   run   time   on   objects   created   with   the   createElement   method.
      

  5.   

    获取值的方式不对.
      这里通过ID得到的 document.getElementById("aa").value  
     而这里是name,家庭住址:<input type="text" maxLength="15" size="20" name="aa />