设定一个BUTTON 按钮 ONCLICK 事件里面 DOCUMENT.FORMS[0].ACTION= **.JSP?A1=**&A2=**&A3=88;DOCUMENT.FORMS[0].SUBMIT();

解决方案 »

  1.   

    不用onChange,在都选完后,点个按钮一起提交不就行了
      

  2.   

    用AJAX实现最简单,实时取数据,
      

  3.   

    HTML文件代码,
    <html>
      <head>
        <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
        <meta content="鋺鉤[hopesoft],http://www.10090.com" name="author">
        <title>鋺鉤&#65421;&#12539;- javascript&#65422;&#65438;&#65423;&#65438;&#65404;&#65398;&#65409;&#65386;&#65398;&#65391;&#65394;&#65419;&#65397;&#65381;</title>
        <style type="text/css">
        body, td
        {
          font-family: &#65419;&#65422;&#65420;&#12539;
          font-size: 12px;
        }
        </style>
    <script language="javascript" src="hpmenu.js"></script>
        <form name="form1" method="post" action="">
            <table width="90%" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#CCCCCC">
              <tr bgcolor="F1F1F1">
                <td height="24" colspan="2" align="center">鋺鉤&#65422;&#65438;&#65423;&#65438;&#65404;&#65398;&#65409;&#65386;&#65398;&#65391;&#65394;&#65419;&#65397;&#65381;-JavaScript&#65392;&#12539;[HPMenu V1.0]</td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td width="12%" height="24" align="center">&#65419;&#12539;&#65428;&#65434; &#65430;&#65438;:</td>
                <td><select name="zhou" id="zhou" onChange="Menu(this.form,1);">
                    <option value="" selected>-----&#65415;&#12539;&#65377;&#65428;&#12539;----</option>
    <option value='&#65413;&#65399;&#65430;&#65438;'>&#65413;&#65399;&#65430;&#65438;</option>
    <option value='&#65425;&#65415;&#65430;&#65438;'>&#65425;&#65415;&#65430;&#65438;</option>
    <option value='&#65399;&#65415;&#65430;&#65438;'>&#65399;&#65415;&#65430;&#65438;</option>
    <option value='&#65396;&#65438;'>&#65396;&#65438;</option>
    <option value='&#65393;&#65393;&#65411;&#65408;&#65430;&#65438;'>&#65393;&#65393;&#65411;&#65408;&#65430;&#65438;</option>
    <option value='&#65412;&#65423;&#65411;&#65408;&#65430;&#65438;'>&#65412;&#65423;&#65411;&#65408;&#65430;&#65438;</option>
                </select></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td height="24" align="center">&#65401;奛&#65377;&#65377;&#65377;&#65404;&#65426;:</td>
                <td><select name="guo" id="select" onChange="Menu(this.form,2);">
                  <option value="" selected>-----&#65415;&#12539;&#65377;&#65428;&#12539;----</option>
                </select></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td height="24" align="center">&#65395;&#65415;&#65377;&#65377;&#65377;&#65377;&#65418;&#65424;:</td>
                <td><select name="shi" id="select2" onChange="Menu(this.form,3);">
                  <option value="" selected>-----&#65415;&#12539;&#65377;&#65428;&#12539;----</option>
                </select></td>
              </tr>
              <tr bgcolor="#FFFFFF">
                <td height="24" align="center">&#65397;&#65432;&#65377;&#65377;&#65377;&#65377;&#65415;&#12539;</td>
                <td><select name="qu" id="select3">
                  <option value="" selected>-----&#65415;&#12539;&#65377;&#65428;&#12539;----</option>
                </select></td>
              </tr>
              <tr bgcolor="F1F1F1">
                <td height="24" colspan="2" align="center">&nbsp;</td>
              </tr>
      </table>
        <br>
        <table width="90%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td height="25" align="left">&#65423;&#65410;&#65428;&#65432;&#65397;&#65432;&#65430;&#65399;&#65379;&#65402;<a href="http://www.10090.com/demo/hpmenu/HPMenu.rar" target="_blank">&#65415;&#12539;羹簑&#12539;/a></td>
              </tr>
              <tr>
                <td height="25" align="left">&#65428;&#65434;&#65423;&#65439;Demo&#65379;&#65402;<a href="http://www.10090.com/demo/" target="_blank">&#65415;&#12539;羹簑&#12539;/a></td>
              </tr>
              <tr>
                <td height="25" align="left">Bug &#65399;&#65396;&#65408;&#65377;&#65379;&#65402;<a href="http://www.10090.com/bbs/index.asp?boardid=60" target="_blank">&#65415;&#12539;羹簑&#12539;/a></td>
              </tr>
              <tr>
                <td height="25" align="left">&#65409;&#65386;&#65423;&#65397;&#65399;&#65405;&#65418;&#65405;&#65379;&#65402;MSN:hopesoft at msn.com</td>
              </tr>
              <tr>
                <td height="25" align="left">&nbsp;</td>
              </tr>
              <tr>
                <td height="50" align="center">copyright(c) 2005 <a href="http://www.10090.com">Hopesoft Studio</a> </td>
              </tr>
            </table>
        <script language="javascript">   
       Menu(eval("document.form1"),1)
      </script>
    </form>
      

  4.   

    当然没有必要,这只是连动下拉AJAX实现的例子,应用到自己的项目中并不需要这么多代码,代码中注释有很多的.
      

  5.   

    ladofwind(随风) 说的对,提交一下就行了,但提交要刷新页面,很不爽,
      

  6.   

    来来,给你小改一下,拿去吧<%@ page contentType="text/html; charset=gb2312"%>
    <%
    String s1 = request.getParameter("S1");
    String s2 = request.getParameter("S2");
    String s3 = request.getParameter("S3");
    %><html>
    <body>
    <form name="form" method="POST" action="list.jsp">
    <select name="S1" width="50" size="1" onChange="document.form.submit()">
    <option value="a1" <%=s1!=null&&s1.equals("a1")?"selected":""%>> a1 </option>
    <option value="b1" <%=s1!=null&&s1.equals("b1")?"selected":""%>> b1 </option>
    </select>
    <select name="S2" width="50" size="1" onChange="document.form.submit()">
    <option value="a2" <%=s2!=null&&s2.equals("a2")?"selected":""%>> a2 </option>
    <option value="b2" <%=s2!=null&&s2.equals("b2")?"selected":""%>> b2 </option>
    </select>
    <select name="S3" width="50" size="1" onChange="document.form.submit()">
    <option value="a3" <%=s3!=null&&s3.equals("a3")?"selected":""%>> a3 </option>
    <option value="b3" <%=s3!=null&&s3.equals("b3")?"selected":""%>> b3 </option>
    </select>
    </form>
    S1:<%=s1%>
    <br>
    S2:<%=s2%>
    <br>
    S3:<%=s3%>
    <br>
    </body>
    </html>
      

  7.   

    不同意kevin的做法这样做 没次都要提交到服务器  那么简单的业务 我想没必要增加服务器的负担 JAVASCRIPT 解决 我想更好