着个可以用javascript来实现!
<FORM name=form1>
          <p> <font color=ffffff size="2">搜索引擎</font> 
<SELECT name=menu1 onchange="MM_jumpMenu('parent',this,0)">
<option value="http://go.163.com/neteden" selected>请您选择</option>
   <option value="http://www.sina.com.cn">中国新浪</option>
    <option value="http://www.sohu.com.cn">搜狐</option>
     <option value="http://www.yahoo.com.cn">中文雅虎</option>
       <option value="http://www.google.com">google</option>
         </SELECT>
            <BR>
          </p>
          </FORM>
<SCRIPT language="JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
  eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0;
}
-->
</script>
这样就差不多了,你只要修改里面相应的地方就行了

解决方案 »

  1.   

    拜托,楼上的老兄,我的select控件里的值是动态,需要连接数据库的,怎么能用JAVASCRIPT实现呢?
      

  2.   

    <select align=right name="selNull" onChange="javascript:window.open(this.options[this.selectedIndex].value,'_self');">
    <% for (int i=1;i<=intSumPage;i++){%>
    <% String strSelected="";
    if (i==intCurPage){
    strSelected="selected";
    }else{
    strSelected="";
    }
    %>
    <option value="tableData.jsp?data=<%=strTable%>&CurPage=<%=i%>" <%=strSelected%>>戞&nbsp;&nbsp;<%=i%>&nbsp;&nbsp;梩
    <% } %>
    <% if (intSumPage==0) {%>
    <option >&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
    <% } %>
    </select>
    你改改吧,有问题再找我
      

  3.   

    <%int iModNum ;//模块数
      String[] sUrl = new String[iModNum] ; //模块相对应的连接
      String[] sModType = new String[iModNum] ; //模块标识
      String[] sModName = new String[iModNum] ; //模块名
      //以上参数都来自数据库
     String sSelectedType = request.getParameter("selectitem")==null?"":request.getParameter("selectitem");
      %>
    <select size=1 style="width:100%" name="select_item" onchange="select_change();" >
    <%for (i = 0;i<iModleNum ;i++)%>
    <option value="<%=sModType[i]%>" <%if (sSelectedType.equals(sModType[i])) 
    {out.println("selected");}%>><%=sModName[i]%></option>
    <%}%>
    </select>
     
       <script language="javascript">
    function select_change(){
        var selvalue = select_item.value ;
    var sLocation;
    switch (selvalue){
    <%for i = 0;i<iModleNum ;i++){%>
    case "<%=sModType[i]%>" :
    sLocation = "<%=sUrl[i]%>" ;
                break ;
    <%}%>
    }
        sLocation = sLocation+"?&selectitem="+selvalue ;
    window.location.href=sLocation ;
    }
       </script>没有调试的,可能有误,只是一种方法。你试试吧。
      

  4.   

    我在ORACLE数据库里有一表BoardInfo,内有字段BoardID,BoardName两种。已写好以下的代码,但问题是按“GO”钮时如何传递BoardID参数,并能跳转到该版块的页面。
     <%
    String BoardName="";
    sql="select * from BoardInfo";
    rs=conn.executeQuery(sql);
    while (rs!=null && rs.next())
    {
    BoardName=BoardName+"<option id='"+rs.getString("BoardID")+"'"+" value='"+rs.getString("BoardID")+"'>"+rs.getString("BoardName")+"</option>";
    }
    if(rs!=null) rs.close();
    //out.println(BoardName);
    String bbsBoard="<select name='Name_select' id='Name_select' style='width:100px'>"+BoardName+"</select>";%>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
    <form name="form2" action="forum_list.jsp?BoardID=" method="post">
     <td align="center"> 
          <%=bbsBoard%>  
      <input type="submit" name="sub" id="sub" value="GO" class="go">
          </td>
    </form>
    </tr>
      </table>
      

  5.   

    按go按钮跳转到指定页面并传递参数,这不是form的基本功能吗?!
    <form action='中转页面' method='post'>
    <select name='boardId'>
    <option value='1'>name1</option>
    ....
    </select>
    <input type="submit" value="G O">
    </form>在中转的页面:request.getParameter("boardId")得到id,根据这个id跳转道指定页面:response.sendRedirect(String)