📌  相关文章
📜  如何在 javascript 代码示例中检查 div 是 display:none 还是 block

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

代码示例1
// If you have set the display property using JavaScript
let current = element.style.display;

// If you have not set the display property manually
let current = window.getComputedStyle(element).display;

// 'current' will be the display style as a string (eg. "none", "block", etc)