Results 1 to 3 of 3

Thread: javascript operators

  1. #1

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    Smile javascript operators

    hi there,
    what im tring to do is to change "bgColor" of my page when the "getSeconds" between.30 and 45 .(Lasts for 15 seconds only).I mean let the bgColor of my document change to "blue" when the seconds are between 30 and 40..I think I should use && --or ||...but how ?..could you give me an example that works..

    **and can we change the color of text/font ,too?using the same method...
    thanks

  2. #2
    Fanatic Member RealisticGraphics's Avatar
    Join Date
    Jul 1999
    Location
    Arkansas
    Posts
    655
    Assuming you know how to grab time already, the if statement would look like:

    Code:
    var sec = 35
    if (sec >= 30 && sec <= 40) {
        \\ add code here
    }
    www.RealisticGraphics.net

    Running VS.Net Enterprise & VB 6

    Other Languages: JavaScript, VBScript, VBA, HTML, CSS, ASP, SQL, XML

    MSN Messenger: kmsheff

  3. #3

    Thread Starter
    Fanatic Member merhaba's Avatar
    Join Date
    Sep 2002
    Location
    Istanbul,Bartin-Gallipoli(Gelibolu-Canakkale)
    Posts
    601

    grabing the time..

    hi again..
    I think I should learn more about "grabbing the time" what is the shortest script that "I can use the time element"
    is "var sec=30" enough" or ..?
    please help
    thanks

Posting Permissions

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



Click Here to Expand Forum to Full Width