Jump to content

clock


techker

Recommended Posts

hey guys i found this code on the net that shows the ctime and the date..

 

now is it possible to remove the date?or change it to french..

 

<Body> 
<Form Name="clock"> 
<Input Name="display" Size="40" Style="Font-Family:Comic Sans MS;Font-Size:24pt;Color:Blue;Font-Weight:700;Border:Solid 0px; Back-Ground:Transparent"> 
</Form> 
</Body> 


<Script Language="JavaScript"> 
<!--// 

function clock() { 
var now = new Date(); 
document.clock.display.value = now.toLocaleString(); 
timerID = setTimeout('clock()', 1000); 
} 

window.onLoad = clock(); 

//--> 
</Script> 

Link to comment
https://forums.phpfreaks.com/topic/130652-clock/
Share on other sites


<Body> 
<Form Name="clock"> 
<Input Name="display" Size="40" Style="Font-Family:Comic Sans MS;Font-Size:24pt;Color:Blue;Font-Weight:700;Border:Solid 0px; Back-Ground:Transparent"> 
</Form> 
</Body> 


<Script Language="JavaScript"> 
<!--// 

function clock() { 
var now = new Date();
var date = now.toLocaleString().split(" ");
document.clock.display.value = date[4] + " " + date[5]; 
timerID = setTimeout('clock()', 1000); 
} 

window.onLoad = clock(); 

//--> 
</Script> 

Link to comment
https://forums.phpfreaks.com/topic/130652-clock/#findComment-678066
Share on other sites

I am starting to learn ajax but I haven't found the time to research the best method for creating an xmlhttprequest object. I do it in a function right now...but that is offtopic.

 

i don't really know what the best is; when i first learned about AJAX, probably 2 years ago - i just did allot of Googling; until i found the method/routine that worked best for me and learned from that.

Link to comment
https://forums.phpfreaks.com/topic/130652-clock/#findComment-678089
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.