📜  页面需要双击按钮 - 无论代码示例

📅  最后修改于: 2022-03-11 15:00:55.056000             🧑  作者: Mango

代码示例1
if (!window.getComputedStyle) {
    // Fallback for obsolete IE
    window.getComputedStyle = function(e) {
        return e.currentStyle;
    };
}

function madison() {
    var x = document.getElementById("madison_inv");
    if (getComputedStyle(x).display === "none") {
        x.style.display = "block";
    } else {
        x.style.display = "none";
    }
}