How do I show something I've hidden?

O

OM

I've just learnt that I can hide a picture using the following command:

document.getElementById("image0").style.display = "none";

BUT... how do I show the picture again!?

Thanks.


OM
 
L

Lasse Reichstein Nielsen

OM said:
I've just learnt that I can hide a picture using the following command:

document.getElementById("image0").style.display = "none";

BUT... how do I show the picture again!?

Image elements are inline elements, so to restore it, you write:

document.getElementById("image0").style.display = "inline";

If you hide a block element, e.g., a div, you would set its display to
"block" to restore it.

/L
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,090
Messages
2,570,603
Members
47,223
Latest member
smithjens316

Latest Threads

Top