<script>
        var a = 2;
        var bb=0;
        function add() {           
            a++;
            var newRow = $("#templateTr").html();
            $("#templateTr").find(".spth").html(a);
            $(".aaa").before(newRow);
            $(".numberspan").html((a));
            bb = a + 1;
            $("#templateTrMade").find(".madespth").html(bb);
        }
        function remove() {
            var index = $(".aaa").index();
            if (index > 5) {
                $("table").find("tr").eq(index).remove();
                a--;
                $("#templateTr").find(".spth").html(a);
                $(".numberspan").html((a));
                bb = a + 1;
                $("#templateTrMade").find(".madespth").html(bb);
            }
        }
    </script>

 

相关文章:

  • 2021-09-11
  • 2022-01-12
  • 2021-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-26
猜你喜欢
  • 2019-08-14
  • 2022-12-23
  • 2022-02-09
  • 2021-05-29
  • 2021-12-25
  • 2021-10-02
  • 2022-12-23
相关资源
相似解决方案