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
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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.