放个hidden控件--->name:hiddenvalue
然后和获得参数一样得到就是:request.getParamter("hiddenvalue")

解决方案 »

  1.   

    对,隐含域同样是这样获得的。request.getParamter("hiddenvalue");
      

  2.   

    <input type="hidden" name="jspStr">
    <INPUT TYPE="button" value="OK" onclick="to();"><SCRIPT LANGUAGE="JavaScript">
    <!--
    function to(){
    document.form1.jspStr.value = "TEST"; alert(document.form1.jspStr.value);
    }
    //-->
    </SCRIPT>
    我也知道,但怎么取呢,用request.getParamter("hiddenvalue");取的是null
      

  3.   

    <%@ page contentType="text/html; charset=gb2312"%>
    <%@page import="java.sql.*"%>
    <%@page import="java.io.*"%>
    <html>
    <head>
    <title></title>
    <head>
    <body>
    <script>
    function shanchu(values)
    {
       with(document.thisform)
       {
       sjkm.value=values;
       action=shuchu.jsp;
       submit();}
    }
    </script>
    <%!Connection conn  = null; %>                      
    <%!Statement  stmt  = null; %>
    <%!ResultSet  RS=null;%>
    <%!String  sql=null;%>
    <%!String[]  CName;%>
    <%!String[]  sj;%>
    <%!ResultSetMetaData  metaData;%>
    <%String bm=request.getParameter("T1");%>
    <%=bm%>
    <form name="thisform" method="post" onsubmit="shuchu.jsp">
    <input type="hidden" name="sjkm">
    <%
    Class.forName("org.gjt.mm.mysql.Driver").newInstance();
         conn = DriverManager.getConnection("jdbc:mysql://localhost/mms", "root","");
         stmt = conn.createStatement();   
      sql="select * from "+ bm;
      RS = stmt.executeQuery(sql);
      metaData=RS.getMetaData();
      int number=metaData.getColumnCount();
      CName=new String[number];
     %>   
    <table width="100%" border="5">   
    <tr>
    <%for (int i=0;i<number;i++){
      CName[i]=metaData.getColumnLabel(i+1);%>
      <th>&nbsp;<%=CName[i]%></th>
              <% }%>
    </tr>         
    <%sj=new String[number];%>
            <tr>
    <%while (RS.next()){%>
            <tr>
       <%for(int i=0;i<number;i++){
          sj[i]=RS.getString(CName[i]);%>
          <th><%=sj[i]%></th>
       <%}%>
       <th><a href="javascript:shanchu('<%=sj[0]%>');" class="a_red">删除</th>
            </tr>
    <%}RS.close();
    stmt.close();
    %>
    </tr>
    </table>
    </form>
    <%String tablename=request.getParameter("sjkm");%>
    <%=tablename%>//取hidden的值
    </body>
    </html>
    我可能写错了,希望高手改一下
      

  4.   

    我明白你的意思了。你可以写成下面的。
    <th><a href=shuchu.jsp?sjkm=<%=sj[0]%> >删除</th>