国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 編程 > JavaScript > 正文

jquery 合并內(nèi)容相同的單元格(示例代碼)

2019-11-20 21:28:28
字體:
供稿:網(wǎng)友
如下所示:
復(fù)制代碼 代碼如下:

 function _w_table_rowspan(_w_table_id,_w_table_colnum){
        _w_table_firsttd = "";
        _w_table_currenttd = "";
        _w_table_SpanNum = 0;
        _w_table_Obj = $(_w_table_id + " tr td:nth-child(" + _w_table_colnum + ")");
        _w_table_Obj.each(function(i){
            if(i==0){
                _w_table_firsttd = $(this);
                _w_table_SpanNum = 1;
            }else{
                _w_table_currenttd = $(this);
                if(_w_table_firsttd.text()==_w_table_currenttd.text()){
                    _w_table_SpanNum++;
                    _w_table_currenttd.hide(); //remove();
                    _w_table_firsttd.attr("rowSpan",_w_table_SpanNum);
                }else{
                    _w_table_firsttd = $(this);
                    _w_table_SpanNum = 1;
                }
            }
        });
    }   

    $(function(){   
    _w_table_rowspan("#_gvInformation",1);
    })
發(fā)表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發(fā)表
主站蜘蛛池模板: 鄂托克旗| 贵州省| 武义县| 繁峙县| 白山市| 光山县| 丹江口市| 新干县| 荔浦县| 彭水| 昆山市| 博白县| 阳东县| 博客| 新营市| 滁州市| 普陀区| 平山县| 丰原市| 遂川县| 宝兴县| 抚顺市| 应用必备| 甘泉县| 句容市| 裕民县| 墨竹工卡县| 门源| 阿尔山市| 阳西县| 罗平县| 白朗县| 大理市| 安达市| 庆元县| 三都| 屯门区| 纳雍县| 运城市| 铅山县| 宝兴县|