Grandstream GXV3140 GMI Guide User Manual
Page 42

Grandstream Networks, Inc.
GMI HTML SDK and API Guide
Page 42 of 43
www.grandstream.com
Last Updated: 09/2010
minutes = thistime.getMinutes
()
;
seconds = thistime.getSeconds
()
;
if
(
eval
(
hours
)
<
10)
{
hours =
"0"
+ hours
}
;
if
(
eval
(
minutes
)
<
10)
{
minutes =
"0"
+ minutes
}
;
if
(
seconds <
10)
{
seconds =
"0"
+ seconds
}
;
thistime = hours+
":"
+ minutes +
":"
+ seconds;
if
(
document
.all
)
{
for
(
i =
0
;i <= clockid.length
-1
; i++
)
{
var
thisclock = eval
(
clockid
[
i
]
)
;
thisclock.innerHTML = thistime;
}
}
if
(
document
.getElementById
)
{
for
(
i =
0
; i <= clockid.length -
1
; i++
)
{
document
.getElementById
(
clockid
[
i
]
)
.innerHTML = thistime;
}
}
var
timer = setTimeout
(
"clockon()"
,
1000)
;
}
……
/******************************************************************************
* After the page loads, start the timer and display the time.
* At the same time, all the key events are handled by the softkey_process function.
******************************************************************************/
<
body
onLoad="clockon
()
"
onkeydown="softkey_process
(
event
.keyCode
)
;"
id
=
"m
yvote-body"
>
<
table
id
=
"myvote-table"
>
<
tr
>
<
td
align
=
"center"
>
<
form
id
=
"clock"
>
<
font
color
=
'#FF6699'
face
=
'tahoma,Arial,Helvetica,sans-serif'
style
=
'font-size:
20px;'
>
<
div
id
=
"layer2"
style
=
"z-index:2;width:57px;height:12px;position:absolute;to
p:95px;left:230px;"
>
<
script
>
writeclock
()
script
>
div
>
<
table
width
=
"4%"
cellspacing
=
"0"
cellpadding
=
"0"
border
=
"0"
>
<
tr
>
<
td
><
img
src
=
"../img/clockbg.gif"
width
=
"180"
height
=
"126"
border
=
"0"
>
a
>
td
>
tr
>
table
>