checkbox 全选反选
1: var i = 1;
2: function CheckAllTeacher() {
3: if (i % 2 == 1) {
4: i++;
5: $("#sendContent input[type='checkbox']").attr("checked", true);
6: } else {
7: i++;
8: $("#sendContent input[type='checkbox']").attr("checked", false);
9: }
10:
11: }
12:
input按钮删除本行记录(Jquery动态删除tr)
1: <a href='javascript:deleteSmg("<%#(Eval("Templateid").ToString())%>")' title="点击删除"><img border=0"" src="../skin/images/de.png" height="20" width="20"/></a>
2:
1: function deleteSmg(id) {
2: if (confirm("是否真的删除?")) {
3: $.ajax({
4: type: "POST",
5: url: "DeleteSmg.ashx",
6: data: "smgId=" + id + "&t="+Math.random(),
7: success: function (msg) {
8: $("#content" + id).closest("tr").remove();
9: }
10: });
11:
12: } else {
13: alert("不删除");
14: }
15: }
16: