©ilj@flowsim.se
JavaScript code samples 3
JavaScript: DATE and TIME

(the date and time displayed depend on the settings on your computer)
>>> this example in Swedish
>>> this example in French




code & explanations further down




 
<SCRIPT LANGUAGE = "JavaScript"
        TYPE="
text/javascript">
<!--

tid = new Date()
document.writeln(tid)
//
-->
</SCRIPT>

will look like this on your screen
 


 
a line
 

<SCRIPT LANGUAGE = "JavaScript"
        TYPE="
text/javascript">
<!--

tid = new Date()
document.writeln(tid.toLocaleString())
//
-->
</SCRIPT>
 
will look like this


 
a line
 
<SCRIPT LANGUAGE = "JavaScript"
        TYPE="
text/javascript">
<!--

tid = new Date()
document.writeln(tid.toGMTString())
//
-->
</SCRIPT>
 
will express the time in Greenwich Mean Time like this
 

 

 


OTHER JAVASCRiPT EXAMPLES
 
How to use javascript to choose what image to show by selecting it in an option list
How to use javascript to switch images
How to use javascript to switch images onmouseover
JavaScript getDay() and document.write
JavaScript date
JavaScript timer
How to use javascript to switch images onmouseover
JavaScript timer
JavaScript onmouseover
JavaScript lastModified
JavaScript/ text in text area
JavaScript/ text in text area
how to open new windows in JavaScript
JavaScript clock
JavaScript confirm
JavaScript alert
JavaScript prompt
JavaScript onmouseover
JavaScript onmouseover2
JavaScript animation
JavaScript animation 2
 

Page by
 
ilj
 
ilj@flowsim.se
 
a square
 
Last modified: August 15, 1998
 
This page should be part of a frames system
at:
www.flowsim.se
JAVASCRiPT