zoukankan      html  css  js  c++  java
  • (转)jquery合并单元格

    文章原文:https://blog.csdn.net/qq422431474/article/details/53318374

    //合并单元格
        jQuery.fn.rowspan = function (colIdx) {
            return this.each(function () {
                var that, rowspan;
                $('tr', this).each(function () {
                    $('td:eq(' + colIdx + ')', this).filter(':visible').each(function () {
                        console.log(1)
                        if (that != null && $(this).html() == $(that).html()) {
                            rowspan = $(that).attr("rowspan");
                            if (rowspan == undefined) {
                                $(that).attr("rowspan", 1);
                                rowspan = $(that).attr("rowspan");
                            }
                            rowspan = Number(rowspan) + 1;
                            $(that).attr("rowspan", rowspan);
                            $(this).hide();
                        } else {
                            that = this;
                        }
                    });
                });
            });
        }
  • 相关阅读:
    socketserver模块
    socketserver密文测试
    Less11-Less12
    Less-5-03
    google语法
    Nmap
    01真的很简单
    kali linux 安装后的必要修改
    SQLMap-02
    SQLMap-01
  • 原文地址:https://www.cnblogs.com/ViokingJava/p/10273578.html
Copyright © 2011-2022 走看看