是她吗?为什么不是他(它),试一下,我这里她很乖.
<form method="POST" action="123.htm" name=form1 target="_blank" >
  <p><input type="text" name="她" size="20"><input type="submit" value="提交" ></p>
</form>

解决方案 »

  1.   

    I try it....,还不很乖
    <form method="POST" action="123.htm" name=form1 target="_blank" >
      <p><input type="text" name="她" size="20"><input type="button" value="提交" onclick=dochk()></p>
    </form>
    <script>
    function dochk(){
    s=form1.elements("她");
    alert(s.name);
    }
      

  2.   

    楼上的代码有错误。拜托把基础打打扎实。以下在ie6上通过。<html>
    <head>
    <script type="text/javascript">
    function CheckMyForm ()
    {
      s = MyForm.elements("它");
      alert(s.name);
    }
    </script>
    </head>
    <body>
    <form id="MyForm" onsubmit="CheckMyForm()">
      <input type="text" name="它" />
      <input type="submit" />
    </form></body>
    </html>
      

  3.   

    以下在mozilla下通过。<html>
    <head>
    <script type="text/javascript">
    function CheckMyForm ()
    {
      s = document.getElementsByName("它");
      alert(s.item(0).name);
      return false;
    }
    </script>
    </head>
    <body>
    <form onsubmit="CheckMyForm()">
      <input type="text" name="它" />
      <input type="submit" />
    </form></body>
    </html>
      

  4.   

    粘贴时,把</script>搞丢了。sorry! 
    HAX把这个小问题都给看出来了,佩服!佩服。