日期:2014-05-18  浏览次数:20788 次

求教多行提交问题!!!急
各位高手,小弟是初学者,最近一个问题困扰很长时间,解决不了,问题是这样的:
我的一个表单可以从数据库中查询出多行记录,每一行有三个控件:text,select,submit   ,其中text是从数据库中获取的,select是用户下拉选择的。
我现在有两个问题解决不了:
1、如何点击每一行submit,都能从本行获取text、select的内容并传给下一个页面
2、我的select   中的数据为何取不到,总是为NULL呢?
谢谢!

附:源代码
<%@   page   contentType= "text/html;charset=gb2312 "%>
<p> 正在登陆目标数据库并查询数据,请稍候...... </p>
<jsp:useBean   id= "DB_Conn "   scope= "page "   class= "JavaBean.DB_Conn "/>
<jsp:useBean   id= "DB_User "   scope= "page "   class= "JavaBean.DB_User "/>
<%@page   import= "java.sql.ResultSet "%>
<%
DB_Conn.ConnectDestDB();  
ResultSet   dest_rs   =   null;

//sql语句:
String   sql_dest   =   "select   *   from   user_tab_comments   ";
//   执行sql语句:
dest_rs   =   DB_Conn.sm.executeQuery(sql_dest);

%>
<%
DB_Conn.ConnectSourceDB();
ResultSet   sour_rs   =   null;

//sql语句:
String   sql_sour   =   "select   *   from   user_tab_comments   ";
//   执行sql语句:


%>

<script   language= "JavaScript ">

function   setparm(   i)

{      

      var   i;
      var   ls_dest,ls_sour;
      ls_dest   =   document.myform.T[i].value;
      ls_sour   =   document.myform.D[i].value;

      document.myform.action   =   "COMPARE_COLUMN.jsp "   +   "?dest= "   +   ls_dest   +   "&sour= "   +   ls_sour;
      document.myform.submit();

}

</script>


  <form   name= "myform "   id= "myform "   method= "POST "   action= "--WEBBOT-SELF-- "   >

<!--webbot   bot= "SaveResults "   U-File= "fpweb:///_private/form_results.csv "   S-Format= "TEXT/CSV "   S-Label-Fields= "TRUE "   -->


<table   border= "1 "   width= "81% "   id= "table1 ">
<tr>
<td   align= "center ">   </td>
<td   align= "center ">   </td>
<td   align= "center "   colspan= "2 "> 目标数据库 </td>
<td   align= "center "> 源数据库 </td>
<td   align= "center "> 目标-源对照 </td>
<td   align= "center "   rowspan= "2 "> 对照结果查看 </td>
</tr>
<tr>
<td   align= "center ">   </td>
<td   align= "center "> 选择 </td>
<td   align= "center "   width= "23% "> 目标数据库表名称 </td>
<td   align= "center "   width= "16% "> 目标数据库表注释 </td>
<td   align= "center "   width= "30% "> 源数据库表名称 </td>
<td   align= "center "   width= "16% "> 字段对照 </td>
</tr>
<%   Stri