我也是啊<HTML>
    <HEAD> <title>地区连动</title>
</HEAD>
<body>
<script language="javascript">
var a=document.all("form");
alert(a)
</script>
<table width="200" border="0" cellspacing="0" cellpadding="0">
 <form id="form">
  <tr>
<td><select id="city1" name="city1"><option>fasdf</select></td>
<td><select id="city2"></select></td>
<td><select id="city3"></select></td>
  </tr>
  </form>
</table>
</body>
</HTML>不知错在哪里,气死了

解决方案 »

  1.   

    一、顺序反了,脚本运行的时候,你的表单还没有被加载,应该把脚本放到表单下面。
    二、name不应该赋 form 这样的关键字
      

  2.   

    <table width="200" border="0" cellspacing="0" cellpadding="0">
     <form id="form">
      <tr>
    <td><select id="city1" name="city1"><option>fasdf</select></td>
    <td><select id="city2"></select></td>
    <td><select id="city3"></select></td>
      </tr>
      </form>
    <script language="javascript">
    var a=document.all("form");
    alert(a);
    </script>
    </table>