function   go(){ 
    document.getElementById("form1").action = "stuValueselectActionTest.action";
    document.getElementById("form1").submit();
      

    </script>
  </head>
  <body>
  
  <s:form name="form1" action="stuValueselectActionTest.action" method="post">
     <s:select          
            label="选择学生"
            list="liststu"
            name="selectStudent"
            listKey="userName"
            listValue="userName"
            emptyOption="false"
            value="3"               
            
           onchange="go " />
       <input type="submit" name="submit">
  </s:form>  </body>

解决方案 »

  1.   

    onchange="go "  没用过这种只这样用过onchange="go()" 
      

  2.   

    onchange 属性="go"  少个了()吧???
      

  3.   

    你选中后能触发到 go()的方法里去么?alert看看
      

  4.   

      function go()
       {
       
        
        
         document.getElementById("form1").action = "stuValueselectActionTest.action";
         
         document.getElementById("form1").submit();
        
       }
        
        
        </script>
      </head>
      <body>
      
      <s:form name="form1" action="stuValueselectActionTest.action" method="post">
         <s:select          
                label="选择学生"
                list="liststu"
                name="selectStudent"
                listKey="userName"
                listValue="userName"
                emptyOption="false"
                value="3"               
                
               onchange="go()" />
           <input type="submit" name="submit">
      </s:form>
    提示:此属性不支持,应该没错吧
      

  5.   

    你在go 里面加个alert试试有输出么。
      

  6.   

    document.getElementById("form1").action = "stuValueselectActionTest.action";
     document.getElementById("") 换成getElementByName() 看下
      

  7.   

    stuValueselectActionTest.action="stuValueselectActionTest.do  
      

  8.   

    如果就一个form 改成下面这种写法 试试  document.forms[0].action="ADCountManager_show.action";
      document.forms[0].submit();
      

  9.   

    用document.getElementByName("form1"); 或者把 <s:form name="form1" action="stuValueselectActionTest.action" method="post"> 中的name="form1" 改为 id=“form1” 试试。
      

  10.   

    function go()
      {
        var fm=document.getElementById("form1");
          fm.submit();
      }
      

  11.   


    document.form1.action="stuValueselectActionTest.action";
    document.form1.submit();
      

  12.   

    你在go方法的最前面加个alert 看进到go里面了没 ,如果进去了你再这么写
    document.form1.action="stuValueselectActionTest.action";
    document.form1.submit();最好把form的id和name都设为form1
      

  13.   

    试过了,不行,alert 可以
      

  14.   

    form.submit();  试下这样 提交!! 写在 go()里面