[removed] How to Hide / Unhide

后端 未结 5 2041
我在风中等你
我在风中等你 2020-12-19 02:25

I\'m trying to avoid using innerHTML because it causes my browser to crash, probably due to the 250 milliseconds refresh rate.

Anyway, I would rather ha

5条回答
  •  春和景丽
    2020-12-19 03:26

    The best way is to set the display none for hidden and block for visible

    //the element is the div you want to hide or display

    element.style.display = (element.style.display == "block") ? "none": "block";

提交回复
热议问题