This question is an exact duplicate of:
这个问题与以下内容完全相同:
I have a table in view page (jsp) that dynamically adds rows. How can I get these row values in my controller class? JSP code
我在视图页面(jsp)中有一个动态添加行的表。如何在控制器类中获取这些行值? JSP代码
<TABLE id="additionalContTable">
<tr>
<td>Email:
<input id= "confirmationEmail1"type="text" name="email" value="">
</td>
</tr>
</TABLE>
ROWS added as on below function in JS on PLUS button click :
ROWS在PLUS按钮上单击时添加了JS中的以下功能:
function addContactAction()
{
$("#additionalContTable").append('<tr>'+
'<td>Email: '+
'<input id="confirmationEmail'+rowNo+'" type="text" name="emailRow" /></td>' +
'</tr>');
rowNo = rowNo +1;
}
1 个解决方案
#1
0
you need to take data by HttpRequestObject. you can simply use reqOject.getParameter("rowName") nd you can iterate it in your controller. you will get all values
你需要通过HttpRequestObject获取数据。你可以简单地使用reqOject.getParameter(“rowName”),你可以在你的控制器中迭代它。你会得到所有的价值
#1
0
you need to take data by HttpRequestObject. you can simply use reqOject.getParameter("rowName") nd you can iterate it in your controller. you will get all values
你需要通过HttpRequestObject获取数据。你可以简单地使用reqOject.getParameter(“rowName”),你可以在你的控制器中迭代它。你会得到所有的价值