Results 1 to 10 of 10

Thread: Date & Time dlm website

  1. #1
    Join Date
    Jul 2001
    Location
    Sekitar Gunung Korbu
    Posts
    3
    Rep Power
    0

    Question Date & Time dlm website

    mcm maner nak letak Date & Time dlm website?? saper buleh bantu..

    jasamu dikenang..

  2. #2
    Join Date
    Jul 2001
    Location
    Jail
    Posts
    228
    Rep Power
    221
    kod dari namo web editor...
    boleh ubah nilai '11' pada body (OnLoad="namosw_init_clock('form1.textclock1', 11)") mengikut kesuaian...

    PHP Code:
    <script language="JavaScript">
    <!--
    function 
    namosw_init_clock()
    {
      var 
    typeitopobjclocks;
      
    clocks = new Array();
      for (
    0top 0namosw_init_clock.arguments.length+= 2) {
        
    obj = eval('document.'+namosw_init_clock.arguments[i]);
        if (
    obj == null) continue;
        if ((
    type namosw_init_clock.arguments[i+1]) < && 11 type) continue;
        
    clocks[top++] = obj;
        
    clocks[top++] = type;
      }
      
    clocks.months = new Array('January''February''March''April''May''June''July',
                                
    'August''September''October''November''December');
      
    clocks.days   = new Array('Sunday''Monday''Tuesday''Wednesday',
                                
    'Thursday''Friday''Saturday');
      
    clocks.k_days = new Array('Ahad''Isnin''Selasa''Rabu''Khamis''Jumaat''Sabtu');
      
    clocks.ampm_str   = new Array('AM''PM');
      
    clocks.k_ampm_str = new Array('Siang''Malam');

      if (
    top 0) {
        
    document.namosw_clocks clocks;
        
    namosw_clock();
      }
    }

    function 
    namosw_clock()
    {
      var 
    itypeclocksnext_callstrhourampmnowyear2year4;
      
    clocks document.namosw_clocks;
      if (
    clocks == null) return;
      
    next_call false;
      for (
    0clocks.length+= 2) {
        
    obj   clocks[i];
        
    type  clocks[i+1];
        
    now   = new Date();
        
    year2 now.getYear();
        
    year4 year2;
        if (
    year2 1000year4 1900 year2;
        if (
    year2 >= 100year2 year4;

        if (
    type == || type == 2) {
          
    obj.value clocks.months[now.getMonth()] + ' ' now.getDate() + ', ' year4;
          if (
    type == 2
            
    obj.value clocks.days[now.getDay()] + ', ' obj.value;
        } else if (
    type == || type == 4) {
          
    obj.value year2 '/' + (now.getMonth()+1) + '/' now.getDate();
        } else if (
    type == || type == 6) {
          
    obj.value now.getDate() + '/' + (now.getMonth()+1) + '/' year2;
        } else if (
    type == || type == || type == 10 || type == 11) {
          
    obj.value now.getDate() + 'hb ' + (now.getMonth()+1) + ' Tahun ' +  year4;
          if (
    type == 9)
            
    obj.value += ' Hari ' clocks.k_days[now.getDay()];
        }
        if (
    type == || type == || type == || type == 10 || type == 11) {
          
    hour now.getHours();
          
    ampm 0;
          if (
    hour >= 12) {
        if (
    hour 12hour -= 12;
        
    ampm 1;
          }
          if (
    type == 10 || type == 11) {
        
    str clocks.k_ampm_str[ampm] +' Jam 'hour+' : 'now.getMinutes() +' Minit ';
        if (
    type == 11str += ' : ' now.getSeconds() +' Saat ';
          } else {
        
    str hour +':'+ ((now.getMinutes() < 10) ? '0'+now.getMinutes():now.getMinutes()) +':'+ ((now.getSeconds() < 10) ? '0'+now.getSeconds():now.getSeconds()) +' 'clocks.ampm_str[ampm];
          }
          if (
    type == 7obj.value  str;
          else           
    obj.value += ' ' str;
        }
        if (
    type == || type == || type == || type == 10 || type == 11)
          
    next_call true;
      }
      if (
    next_call)
        
    window.setTimeout("namosw_clock();"1000);
    }

    // -->
    </script>

    <body bgcolor="white" text="black" link="blue" vlink="purple" alink="red" OnLoad="namosw_init_clock('form1.textclock1', 11)">
    <form name="form1">
        <p><input type="text" name="textclock1" size="50"></p>
    </form> 

  3. #3
    Join Date
    Dec 2001
    Location
    Labuan
    Posts
    83
    Rep Power
    213
    what programming language u are using, if asp, senang aje.. else just use javascripts. but my comment is use the shorter scripts as possible, you can find tonnes of scripts on the net. it's free. one good website is
    www.dynamicdrive.com
    aLvinHan of ViNSiGN Web Design in Labuan and PJ

  4. #4
    Join Date
    Jul 2003
    Location
    aku org malaysia...
    Posts
    45
    Rep Power
    0
    kat
    http://javascript.internet.com
    kat sini pun free..n kebanyakkan blh run...
    aku seadanya...

  5. #5
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    273
    dia kan.. senang dalam PHP gak
    PHP Code:
    <?
    $tarikh 
    date('d/m/y');

    echo 
    "$tarikh";
    ?>
    :P jadi.. baik lah belajar dengan lebih pantas dan advanced

  6. #6
    Join Date
    Sep 2001
    Location
    epox
    Posts
    432
    Rep Power
    223
    pandai la kot
    date( 'd/m/y',time() );
    baru work
    Munzir + "/^[Hh](a)(z)\1\2[iI]$/"

  7. #7
    Join Date
    Mar 2003
    Location
    Kamunting, Perak
    Posts
    640
    Rep Power
    209
    patut la pun... rasa terkurang something...

    "belajar dr kesilapan"

  8. #8
    Join Date
    Jun 2003
    Location
    malaysia
    Posts
    315
    Rep Power
    200
    javascript.internet.com is sh!* coz....they put their credits for each script... dynamic drive is better

    !!

  9. #9
    Join Date
    Jun 2001
    Location
    Mystic Kingdoms
    Posts
    2,749
    Rep Power
    273
    Originally posted by MHR
    pandai la kot
    date( 'd/m/y',time() );
    baru work
    no need the time laa..
    yang tuh dah works..
    dia nak tarikh saja.. bukan time skali

  10. #10
    Join Date
    Jun 2003
    Location
    Papar, Sabah
    Posts
    266
    Rep Power
    199
    guna javascript je la... attach je... kan senang..! detail lagi..!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. PART TIME JOB: WEBSITE PROMOTER (RM1200 Sebulan)
    By nazreey in forum Job Vacancies
    Replies: 0
    Last Post: 15-10-2009, 05:17 PM
  2. time & date on tittle bar (javascript)
    By fifin04 in forum Website Design
    Replies: 0
    Last Post: 11-11-2005, 05:47 PM
  3. date&time in mysql
    By white_neck in forum Website Programming
    Replies: 4
    Last Post: 19-09-2005, 05:49 PM
  4. between 2 date
    By meiji in forum Website Programming
    Replies: 2
    Last Post: 29-04-2005, 09:44 AM
  5. date and time
    By hafizuddin in forum Website Programming
    Replies: 7
    Last Post: 01-12-2004, 02:18 AM

Posting Permissions

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

Search Engine Optimization by vBSEO 3.5.0 RC1 PL1

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32