用document.form1.elements["text.edit"].value 就可以了

解决方案 »

  1.   

    晕,又遇到一个这样的情况!像下面这样
    <input type="text" name="text.edit" id="text.edit" value="ttt">
    用document.getElementById("text.edit").value试试另外,看下这个帖子:http://community.csdn.net/Expert/topic/3920/3920613.xml?temp=9.496707E-02
      

  2.   

    <html>
    <head></head>
    <body>
      <input type="text" name="text.edit" id="text.edit"><input type="button" value="text.edit" onclick="getValue()">
    </body>
    <script>
    function getValue(){
      alert(document.getElementById("text.edit").value);
    }
    </script>
    </html>
      

  3.   

    谢谢大家了
    已经解决问题了
    baiyunfei和prentice1001的解法是正确的,
    我用document.form1.elements["text.edit"].value 出了点问题,
    不加form1就可以了