Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    Regular Coder
    Join Date
    Oct 2002
    Location
    USA
    Posts
    255
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Question Image Time Switch script doesn't work

    Corrected mistake.

    Please post to "scripts"

    Thanks.

    Code:
    day=new Date()  
    x=day.getHours()
    
    if(x>=0 && x<5) {
       document.write('<img src="davemustaine1.jpg" alt="Dave Mustaine" />')
    } else if(x>=5 && x<12) {
       document.write('<img src="davemustaine2.jpg" alt="Dave Mustaine" />')
    } else if(x>=12 && x<24) {
       document.write('<img src="davemustaine3.jpg" alt="Dave Mustaine" />')
    }
    Last edited by ssskaya; 06-12-2004 at 03:04 PM.

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    Wichita
    Posts
    3,880
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Is there a question here needing an answer?
    Check out the Forum Search. It's the short path to getting great results from this forum.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •