12.3. Dynamic date and time on the Web
12.3.1. Implementation of clocks with different time formats
One simple implementation of a clock is shown in the following code:
Example. ex12–11.htm – Simplest Clock 01
1: <?xml version="1.0" encoding="iso-8859–1"?> 2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 3: "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 4: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 5: <head><title>Simplest Clock 01 - ex12–11.htm</title></head> 6: <body onload="simplestClock()"> 7: <h2>A Simple Clock Implementation<h2><br /> 8: <form name="form01" action=""> 9: <input type="text" name="clock01" id="clock01" value="cSt" size="40" /> 10: </form> 11: <script> 12: function simplestClock() ... |
Get Practical Web Technologies now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.