会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
龍峸
Asp.Net - jQuery
博客园
首页
新随笔
联系
管理
订阅
动态时间
<
html
>
<
head
>
<
title
>
无标题文档
</
title
>
<
meta http
-
equiv
=
"
Content-Type
"
c
>
</
head
>
<
body bgcolor
=
"
#000000
"
text
=
"
#000000
"
>
<
style
>
<!--
.styling
{
background
-
color:black;
color:lime;
font: bold 16px MS Sans Serif;
padding: 3px;
}
-->
</
style
>
<
span id
=
"
digitalclock
"
class
=
"
styling
"
></
span
>
<
script
>
<!--
var alternate
=
0
var standardbrowser
=!
document.all
&&!
document.getElementById
if
(standardbrowser)
document.write(
'
<form name="tick"><input type="text" name="tock" size="11"></form>
'
)
function show()
{
if
(
!
standardbrowser)
var clockobj
=
document.getElementById
?
document.getElementById(
"
digitalclock
"
) : document.all.digitalclock
var Digital
=
new
Date()
var hours
=
Digital.getHours()
var minutes
=
Digital.getMinutes()
var dn
=
"
AM
"
if
(hours
==
12
) dn
=
"
PM
"
if
(hours
>
12
)
{
dn
=
"
PM
"
hours
=
hours
-
12
}
if
(hours
==
0
) hours
=
12
if
(hours.toString().length
==
1
)
hours
=
"
0
"
+
hours
if
(minutes
<=
9
)
minutes
=
"
0
"
+
minutes
if
(standardbrowser)
{
if
(alternate
==
0
)
document.tick.tock.value
=
hours
+
"
:
"
+
minutes
+
"
"
+
dn
else
document.tick.tock.value
=
hours
+
"
"
+
minutes
+
"
"
+
dn
}
else
{
if
(alternate
==
0
)
clockobj.innerHTML
=
hours
+
"
<font color='lime'> : </font>
"
+
minutes
+
"
"
+
"
<sup style='font-size:1px'>
"
+
dn
+
"
</sup>
"
else
clockobj.innerHTML
=
hours
+
"
<font color='black'> : </font>
"
+
minutes
+
"
"
+
"
<sup style='font-size:1px'>
"
+
dn
+
"
</sup>
"
}
alternate
=
(alternate
==
0
)
?
1
:
0
setTimeout(
"
show()
"
,
1000
)
}
window.
//
-->
</
script
>
</
body
>
</
html
>
posted @
2008-02-14 19:11
龍峸.大卫
阅读(
210
) 评论(
0
)
编辑
收藏
举报
会员力量,点亮园子希望
刷新页面
返回顶部
公告