Public paste
Undefined
By: Guest | Date: Jul 15 2010 09:15 | Format: None | Expires: never | Size: 1.38 KB | Hits: 868

  1. <html>
  2. <head>
  3. <img id="plaatje" src="GDIPlus_Image2.jpg">
  4. <title></title>
  5. <script type="text/javascript">
  6. function getCurrentTime()
  7.  
  8. {
  9. var myDate = new Date();
  10. var mySecs = myDate.getSeconds();
  11.  
  12. if(mySecs < 10)
  13. mySecs = "0" + mySecs;
  14.  
  15. var time = mySecs;
  16. document.getElementById('time').innerHTML=(time);
  17.  
  18.  
  19. if(time == "00") //Change this to whatever time you want
  20. //location.reload();
  21. document.getElementById('plaatje').setAttribute('src', 'GDIPlus_Image2.jpg');
  22.  
  23. if(time == "10") //Change this to whatever time you want
  24. //location.reload();
  25. document.getElementById('plaatje').setAttribute('src', 'GDIPlus_Image2.jpg');
  26.  
  27. if(time == "20") //Change this to whatever time you want
  28. //location.reload();
  29. document.getElementById('plaatje').setAttribute('src', 'GDIPlus_Image2.jpg');
  30.  
  31. if(time == "30") //Change this to whatever time you want
  32. //location.reload();
  33. document.getElementById('plaatje').setAttribute('src', 'GDIPlus_Image2.jpg');
  34.  
  35. if(time == "40") //Change this to whatever time you want
  36. //location.reload();
  37. document.getElementById('plaatje').setAttribute('src', 'GDIPlus_Image2.jpg');
  38.  
  39. if(time == "50") //Change this to whatever time you want
  40. //location.reload();
  41. document.getElementById('plaatje').setAttribute('src', 'GDIPlus_Image2.jpg');
  42.  
  43. }
  44. </script>
  45. </head>
  46. <body onload="setInterval('getCurrentTime()', 1000);">
  47. <div id="time"></div>
  48. </body>
  49. </html>