看怎么触发了,我也不懂,关注....
"STRUTS的<html:form>没有name属性",这个怀疑,因为<form ...></form>是有name属性的

解决方案 »

  1.   

    可以用document.all.下拉列表名字
    这样能够取得你要的,其实如果使用OnChange也能实现你要的功能
    只要在Onchange中添加提交事件就行了,这样就会转到你的Action中执行了。
      

  2.   

    它有NAME的,是你的页面所对应的ACTIONFORM的名字
    可以试试OnChange事件
      

  3.   

    我是这么写的,但还是出错,ActionForm是employeeForm,Action是insertEmployee,请问应该怎么改才行?
    <html>
    <head>
    <script>
    function changeRadio(SID)
    {
      document.location="?schooluuid="+SID+"&year="+document.all.employeeForm.value;
    }
    </script>
    </head>
    <body>
    <html:form action="insertEmployee" focus="name">
      <html:select name="employeeForm" property="department" onchange='changeRadio("2815");'>
            <html:options collection="departments" property="id" labelProperty="description"/>
      </html:select><html:submit><bean:message key="button.submit"/></html:submit>
    </html:form>
    </body>
    </html>
      

  4.   

    用struts框架的,form表单是不用写名称的,而是在config文件中配置Action的时候就绑定了。
    比如配置中
      <form-beans>
        <form-bean name="LogonForm" type="com.test.LogonForm"/>
      </form-beans>
      <action-mappings>
        <action name="LogonForm"
                type="com.test.LogonAction"
                input="/logon.jsp"
                scope="request"
                path="/logon">
          <forward name="success" path="/index.jsp" />
          <forward name="error" path="/logon.jsp" />
        </action>
       <action-mappings>这里的name,就是form表单的name,
    在logon.jsp页面中<html>
    <head>
    <script>
    function changeRadio(SID)
    {
      alert(document.LogonForm.department.value);//这里的form名称就是LogonForm
    }
    </script>
    </head>
    <body>
    <html:form action="logon.do" focus="name">
      <html:select property="department" onchange='changeRadio("2815");'>
        <html:options collection="departments" property="id" labelProperty="description"/>
      </html:select><html:submit><bean:message key="button.submit"/></html:submit>
    </html:form>
    </body>
    </html>
      

  5.   

    多谢 feng_sundy(晓风) ,问题已解决!