【发布时间】:2010-07-27 20:34:28
【问题描述】:
我想知道如何在数据表中的特定行之后添加行。 为此,我正在使用 jQuery 数据表插件。
我可以通过表格行索引。我需要将该行插入到我的 javascript 函数中,如下所示:
function addNewContact(rCount){
..
}
而我的 HTML 代码是:
table id="exampleTbl"
tr
td..../td (data of first column)
td..../td (data of second column)
...
td
input type="button" id="addNewContact<%=rCount %>" name="addNewContact_Details" value="+" onclick="javascript:addNewContact(<%=rCount %>);"
/td
/tr
/table
对于新添加的行,我希望前 3 列为空白,其他列 (5) 包含文本框。
【问题讨论】:
-
您无需在代码周围添加
code标签,只需将其缩进四个空格即可。 -
哦,好吧,刚接触堆栈溢出,我不知道。你有我的问题的解决方案吗?
标签: jquery jquery-plugins