0
我正在顯示錶格中的表格行。每行有5列,其中一列是(可編輯的)文本框字段。自動選擇行中的複選框
ajaxLoading(true);
$.post('<%=request.getContextPath()%>'+"/processServlet", postData,
function(data) {
var ctxPath='<%=request.getContextPath()%>';
currentPosition = data.currentPosition;
var items = $("#itemsTable");
items.empty();
if (data.items.length == 0) {
items.append($('<tr><td colspan=5 style="color:red;">No items<td></tr>'));
}
;
for (var i = 0; i < data.items.length; i++) {
editText = "";
items.append($("<tr " + zebra + "><td><a href=\"javascript: deviceView('" + data.items[i].id + "')\">" + data.items[i].num +
"</a></td><td>" + data.items[i].itemType +
"</td><td><input type = 'checkbox' id = 'CheckBoxRow_' />" + data.items[i] +
"</td><td><input type = 'textbox' id = 'TextBoxRow_' value = '" + data.items[i].itemName +"' "/>" +
"</td><td>" + data.items[i].status +
"</td><td>" + data.items[i].date + "</td>" +
"<td>" + data.items[i].firmware + "<td>" +
"<a href=\"javascript: deleteItem('" + data.items[i].id + "')\">Delete</a>" +
"</tr>"));
;
ajaxLoading(false);
}, "json");
如何在文本框中輸入或修改數據並將數據保存在數據庫中時自動選擇複選框?
這是怎麼回到每一行。 – Sree 2011-06-15 00:37:36
謝謝!!!!!!!!!!!! – Sree 2011-06-20 04:09:21