Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
194
rated 0 times [  200] [ 6]  / answers: 1 / hits: 19525  / 13 Years ago, sat, june 18, 2011, 12:00:00

Im trying to make a script in which an image appears for the user after 10 minutes. Think of it as a timer. And once the timer reaches 0, an image appears. Im pretty new to javascript, so I really have no idea where to start. Does anyone know of a script which will do the job, or maybe point me in the right direction? Thanks.


More From » javascript

 Answers
25

This is how you should add your image to your HTML



<img id=myimage src= style=display:none />


Here is your JavaScript:



<script type=text/javascript>
setTimeout(function(){
document.getElementById('myimage').style.display = 'block';
},600000);
</script>


You can test it here


[#91641] Thursday, June 16, 2011, 13 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
theo

Total Points: 680
Total Questions: 108
Total Answers: 81

Location: Laos
Member since Fri, Sep 11, 2020
4 Years ago
;