Monday, May 20, 2024
 Popular · Latest · Hot · Upcoming
18
rated 0 times [  25] [ 7]  / answers: 1 / hits: 115824  / 15 Years ago, mon, june 15, 2009, 12:00:00

How can you make a simple tag like <img src=a.gif> hidden programmatically using JavaScript?


More From » html

 Answers
122

I'm not sure I understand your question. But there are two approaches to making the image invisible...



Pure HTML



<img src=a.gif style=display: none; />


Or...



HTML + Javascript



<script type=text/javascript>
document.getElementById(myImage).style.display = none;
</script>

<img id=myImage src=a.gif />

[#99312] Thursday, June 11, 2009, 15 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
turnerf

Total Points: 620
Total Questions: 101
Total Answers: 109

Location: French Polynesia
Member since Tue, Jul 7, 2020
4 Years ago
turnerf questions
;