zoukankan      html  css  js  c++  java
  • jQuery如何动态删除TR,input按钮删除本行记录,checkbox全选反选

    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:   
  • 相关阅读:
    飞鸽传书中文源码
    nohup命令参考
    Linux平台编程新手入门 C语言中的移位操作
    小技巧:让linux程序在后台运行
    2440之中断管理
    linux终端中输出彩色字体(C/SHELL)
    C语言标准中的逻辑位移和算术位移
    SQL2005利用ROW_NUMER实现分页的两种常用方式
    不用现有方法,把string转换成int型[C#]
    C# 如何生成一个时间戳
  • 原文地址:https://www.cnblogs.com/joeylee/p/3028166.html
Copyright © 2011-2022 走看看