Answers for "js div display none"

16

display none js

document.getElementById("myDIV").style.display = "none";
Posted by: Guest on May-06-2020
1

how to check div is display:none or block in javascript

// 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)
Posted by: Guest on June-02-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language