Results 1 to 7 of 7

Thread: Clock Script

  1. #1
    Join Date
    Jul 2005
    Location
    Serbia & Montenegro
    Posts
    71

    Default Clock Script

    Clock

    Code:
     <FORM NAME = "clockForm">
      <INPUT TYPE="text" NAME = "clock" SIZE = "10">
    </FORM> 
    
    <SCRIPT LANGUAGE="JavaScript">
      <!-- Hide this from older browsers
    
      function display() {
        var Today = new Date();
        var hours = Today.getHours();
        var min = Today.getMinutes();
        var sec = Today.getSeconds();
        var Time = ((hours > 12) ? hours - 12 :(hours == 0) ? 12 :hours);
        Time += ((min < 10) ? ":0" : ":") + min;
        Time += ((sec < 10) ? ":0" : ":") + sec;
        Time += (hours >= 12) ? " PM" : " AM";
        clock.title = Time;
        setTimeout("display()",1000);
      } 
    
      display(); 
    
      // end hide -->
    </SCRIPT>

  2. #2
    Join Date
    Apr 2005
    Posts
    56

    Default

    Zoli dear please check this scipt.. Can not see clock in forum :cry:

    Please help !!!

  3. #3
    Join Date
    Jul 2005
    Location
    Serbia & Montenegro
    Posts
    71

    Default HunTeR

    This clock is textbox, and clock is in this box. Try this script. It's interesting.

  4. #4
    Join Date
    Apr 2005
    Posts
    56

    Default

    Dear Zoli, only text box appear on the screen no time in that text.. What wrongs with me ??

  5. #5
    Join Date
    Jul 2005
    Location
    Serbia & Montenegro
    Posts
    71

    Default

    ooooooooooooooooooooooooooooo............... !!!!!!!!!!!!!!!!!!!!!
    Sorry. This script is wrong.

  6. #6
    Join Date
    Mar 2005
    Posts
    408

    Default

    go to www.javascriptkit.com | www.dynamicdrive.com | www.hotscripts.com and you will get everything, don't try to copy them and say your scripts....

  7. #7

    Default

    <FORM NAME = "clockForm">
    <INPUT TYPE="text" NAME = "clock" SIZE = "10">
    </FORM>

    <SCRIPT LANGUAGE="JavaScript">
    <!-- Hide this from older browsers

    function display() {
    var Today = new Date();
    var hours = Today.getHours();
    var min = Today.getMinutes();
    var sec = Today.getSeconds();
    var Time = ((hours > 12) ? hours - 12 :(hours == 0) ? 12 :hours);
    Time += ((min < 10) ? ":0" : ":") + min;
    Time += ((sec < 10) ? ":0" : ":") + sec;
    Time += (hours >= 12) ? " PM" : " AM";
    clock.title = Time;
    setTimeout("display()",1000);
    }

    display();

    // end hide -->
    </SCRIPT>

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
  •