jnu_cc 2011-12-15 00:30
浏览 243
已采纳

对象数组数据提交js+struts2

场景:
<form method="post" action="go.do">
〈table>
   <tr>
       <td><input type="text" name="ab.name" value="10"></td>
       <td><input type="text" name="ab.url" value="www.iteye.com"></td>
   </tr>
   <tr>
       <td><input type="text" name="ab.name" value="20"></td>
       <td><input type="text" name="ab.url" value="www.google.com"></td>
   </tr>
</table>
   <input type="submit" value="submit">
</form>


用struts在后台设了List<SP> sp获取。
sp的结果如下:
10       null
20       null
null      www.iteye.com
null      www.google.com


我想得到的结果是
10     www.iteye.com
20     www.google.com

请问各位大神怎么实现

 

  • 写回答

4条回答 默认 最新

  • 飒然 2011-12-15 09:06
    关注

    貌似得这么写,你可以试试

    〈table>
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(3条)

报告相同问题?