Results 1 to 2 of 2

Thread: Display Code After Some Many Seconds

  1. #1
    Join Date
    Jun 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Display Code After Some Many Seconds

    Hi there,

    I dont know if I should post this in JavaScript or PHP and other codes because I dont know what suits this. I want make a code, which after some many seconds it will disply the code.

    Example:

    <html>
    <? After 3 seconds disply ?>
    Hello
    else
    null
    <end>

    You know, something like that .

    Thanks.

    Best Regards,
    Chill_Guy

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
    <html>
      <head>
        <title>Page Sans Titre</title>
      </head>
      <body>
        <div id="delayed_show">
          <script type="text/javascript">
            document.getElementById('delayed_show').style.display = 'none';
          </script>
    
          <p>Some code that you want to display a little later goes here.</p>
        </div>
        <script type="text/javascript">
          setTimeout(function() {
            document.getElementById('delayed_show').style.display = 'block';
          }, 3 * 1000);
        </script>
      </body>
    </html>
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

Bookmarks

Posting Permissions

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