🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cn.bbs.comp.lang.java
Article #23987

Re: ˭�ṩ�����û����ʱʱ��ij���

#23987
From: ��ɽ����
Date: Sun, 12 Jul 1998 00:00
66 lines
5082 bytes
> ==> Ruoyun_H(��ɽ����)                       ˵��: 
> �б�Ҫ��?
> ȥ�ҵİ濴��,��JavaScript���հ�
> See WebMaster Board
> Ҫ��Ȼ��ת�����


<div id="Clock" align="left"                                                    
    style="font-family: Verdana; font-weight:bold;
font-size:14; color:#0000FF"> 
<p align="left">                                                                
<span style="vertical-align: top">                                              
<script>                                                                        
function tick() {                                                               
  var hours, minutes, seconds, ap;                                              
  var intHours, intMinutes, intSeconds;                                         
  var today;                                                                    
                                                                                
  today = new Date();                                                           
                                                                                
  intHours = today.getHours();                                                  
  intMinutes = today.getMinutes();                                              
  intSeconds = today.getSeconds();                                              
                                                                                
  if (intHours == 0) {                                                          
     hours = "12:";                                                             
     ap = "Midnight";                                                           
  } else if (intHours < 12) {                                                   
     hours = intHours+":";                                                      
     ap = "A.M.";                                                               
  } else if (intHours == 12) {                                                  
     hours = "12:";                                                             
     ap = "Noon";                                                               
  } else {                                                                      
     intHours = intHours - 12                                                   
     hours = intHours + ":";                                                    
     ap = "P.M.";                                                               
  }                                                                             
                                                                                
  if (intMinutes < 10) {                                                        
     minutes = "0"+intMinutes+":";                                              
  } else {                                                                      
     minutes = intMinutes+":";                                                  
  }                                                                             
                                                                                
  if (intSeconds < 10) {                                                        
     seconds = "0"+intSeconds+" ";                                              
  } else {                                                                      
     seconds = intSeconds+" ";                                                  
  }                                                                             
                                                                                
  timeString = hours+minutes+seconds+ap;                                        
                                                                                
  Clock.innerHTML = timeString;                                                 
                                                                                
window.setTimeout("tick()", 100);            
//��Ҫ����ʵ�����
                                   
}                                                                               
                                                                                
window.onload = tick;                                                           
</script>��</span></p>                                                          
    </div>                                                                      

--
�� ��Դ: �й�ƴ�BBSվ [bbs.ustc.edu.cn]
Technical Details
Message-ID: <980712.yvOCT$PBBS@bbs.ustc.edu.cn>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: Chinese,GB
X-Google-Thread: f6cb0,2cc90dc8f55bfcc9
X-Google-Attributes: gidf6cb0,public
From: Ruoyun_H@bbs.ustc.edu.cn (��ɽ����)
Subject: Re: ˭�ṩ�����û����ʱʱ��ij���
Date: 1998/07/12
Message-ID: <980712.yvOCT$PBBS@bbs.ustc.edu.cn>
X-Deja-AN: 370913817
Organization: �й�ƴ�BBSվ
Newsgroups: cn.bbs.comp.lang.java