Timer example, 8 timer example – Grandstream GXV3140 GMI Guide User Manual
Page 41

Grandstream Networks, Inc.
GMI HTML SDK and API Guide
Page 41 of 43
www.grandstream.com
Last Updated: 09/2010
</
td
>
<
td
width
=
"100px"
align
=
"center"
>
<
a
>
</
a
>
</
td
>
<
td
onclick="GMIEngine.historypage
(-1)
;"
width
=
"100px"
align
=
"center"
>
<
a
><
font
class
=
"softkey"
>
Back
</
font
></
a
>
</
td
>
<
td
width
=
"40px"
>
</
td
>
</
tr
>
</
table
>
</
body
>
6.8 Timer Example
Figure 9: Timer Example illustration
Refer to the code and the comments below for the implementation of Timer Example:
File: timer.html
……
/******************************************************************************
*After the page loads, it is executed immediately and the tiemr is activated. The
timer will display the current time in innerHTML every second.
******************************************************************************/
function
clockon
()
{
thistime =
new
Date
()
;
hours = thistime.getHours
()
;