Results 1 to 2 of 2

Thread: setTimeout

  1. #1
    gencoglu
    Guest

    setTimeout

    Hello
    Please help me .I am new to Javascript..and I 'd like you to give me 3 or more examples on "setting time" in oder to move text and images on my web page..I want to learn more on "SETTIMEOUT.."I CAN USE marquee to do that..but please tell me some on "settimeout"functions..thanks

  2. #2
    Stuck in the 80s The Hobo's Avatar
    Join Date
    Jul 2001
    Location
    Michigan
    Posts
    7,256
    The SetTimeout() executes a function, after a given amount of time (in milliseconds):

    Code:
    //setTimeout('functionName()',Time);
    
    $time = 12000;
    $message = 'setTimeout has ended';
    
    setTimeout('display()', $time);
    
    function display() {
      document.write($message);
    }
    display() will be executed after 12 seconds. I don't see why you'd need "3 or more examples," but I guess if you need more, let me know.
    My evil laugh has a squeak in it.

    kristopherwilson.com

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