//jquery each func 初試
//btn set,找出表格被勾選的checkbox
$("#btnCommentDelete").click(function() {
var valSet = "";
$("#ctl00_ContentPlaceHolder1_gvComment input:enabled[type=checkbox]").each(function(i, obj) {
if ($(obj).attr("id") == "cbAllComment") {
}
else {
valSet += $(obj).attr("value") + ',';
//移除表格列
$(obj).parents("#ctl00_ContentPlaceHolder1_gvComment tr").remove();
}
});
alert(valSet);
if (valSet != "") {
$.get("comment_delete.aspx", { cidset: valSet }, function(data) {
alert(data);
});
}
else {
Boxy.alert("No Data");
}
});
沒有留言:
張貼留言
留個話吧:)