2
只需要寻找最佳实践方法即可。 我有一个表格列表信息,最后一列是一个带有“编辑/查看”的按钮。当用户点击按钮上显示一个div面积可与JSTL将var传递给jquery的function()js
<script type="text/javascript">
//Click on Edit/View on table
$('.viewCustomer').click(function()
{
.......
});
</script>
<tr class="odd">
<td>${customerBean.comName}</td>
<td>${customerBean.comCode}</td>
<td class="noRightPad"> <input type="submit" name="createBut" value="View/Edit" class="viewCustomer" /> </td>
</tr>
的一些片断进行编辑下面
代码的详细信息所以我的问题是:
(1)如何(函数()
(2)这是要做到这一点的最好方法吗?是否有更高效/安全/更清洁的做法这个?
干杯 Alexis
嗨, 我期待通过一个字符串变量。因此,如果用户点击了位于表格第4行的按钮,并且在该行中,另一个客户有客户ID 1234,我想要传递变量1234. 干杯 alexis – alexis 2010-08-24 14:05:59
James谢谢! 那正是我需要的。 Alexis – alexis 2010-08-25 10:53:13