Scripts/js11.js

(完整代码) 1KB

function preview() {
    
    bdhtml = window.document.body.innerHTML;
    sprnstr = "<!--startprint-->";
    eprnstr = "<!--endprint-->";
    prnhtml = bdhtml.substr(bdhtml.indexOf(sprnstr) + 17);
    prnhtml = prnhtml.substring(0, prnhtml.indexOf(eprnstr));
    window.document.body.innerHTML = prnhtml;
    hideLastRow();
    obj = document.getElementById("showTb");
    var num = obj.rows[0].cells.length-1  //获取最后一列
    hide(num);
    window.print();
}


//隐藏列
function hide(cell) {
    obj = document.getElementById("showTb");
    for (i = 0; i < obj.rows.length; i++) {
        obj.rows[i].cells[cell].style.display = "none";
    }
}
function hidelastcolumn() {
    obj = document.getElementById("showTb");
    var num = obj.columns.length;
    alert(num);
    obj.columns[num].style.display = "none";
}

//  显列
function show(cell) {
    obj = document.getElementById("showTb");
    for (i = 0; i < obj.rows.length; i++) {
        obj.rows[i].cells[cell].style.display = "block";
    }
}


function hideLastRow() {
    document.getElementById("trName").style.display = "none";
}







24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。