I hid a div, how do I get her back?

Asked

Viewed 20 times

1

I’m trying to create a phrase in an HTML q gets hidden, but it appears when a function is activated.

The code I used to hide the div q contains the phrase was:

document.getElementById('cal').style.display = "none";

(I put it at the beginning of the script)

So the phrase in the div was hidden. But as I do to show it again so q I activate a function, such as pressing a button?

1 answer

1

Just change the display style to the default that is block:

document.getElementById('cal').style.display = "block";

Browser other questions tagged

You are not signed in. Login or sign up in order to post.