Want to change style="display: block" to style="display: none" how can I do it with onload Client Script

Harshal Sonawa1
Kilo Guru

find_real_file.pngI want to hide that square box which is getting displayed.

Once I change this style="display: block" to style="display: none" it will get hidden. Can someone show me how can we do it. 

1 ACCEPTED SOLUTION

Harshal Sonawa1
Kilo Guru

Here is the solution for this:

 var x = document.getElementById('tabs2_section');   //enter any tag id name which u want to hide
        if (x.style.display === "none") {
            x.style.display = "block";
        } else {
            x.style.display = "none";
        }

View solution in original post

1 REPLY 1

Harshal Sonawa1
Kilo Guru

Here is the solution for this:

 var x = document.getElementById('tabs2_section');   //enter any tag id name which u want to hide
        if (x.style.display === "none") {
            x.style.display = "block";
        } else {
            x.style.display = "none";
        }