asp.net C# 如何显示时间 要秒跳动显示的那种?
2个回答
展开全部
<html>
<head>
<script type="text/javascript">
function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('txt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}
function checkTime(i)
{
if (i<10)
{i="0" + i}
return i
}
</script>
</head>
显示动态时间<br>
<body onload="startTime()">
<div id="txt"></div>
<script type="text/javascript">
var d=new Date()
var weekday=new Array(7)
weekday[0]="Sunday"
weekday[1]="Monday"
weekday[2]="Tuesday"
weekday[3]="Wednesday"
weekday[4]="Thursday"
weekday[5]="Friday"
weekday[6]="Saturday"
document.write("Today it is " + weekday[d.getDay()])
</script>
<br>
将当前日期转换成字符串<br>
<script type="text/javascript">
var d = new Date()
document.write (d.toUTCString())
</script>
</body>
</html>
<head>
<script type="text/javascript">
function startTime()
{
var today=new Date()
var h=today.getHours()
var m=today.getMinutes()
var s=today.getSeconds()
// add a zero in front of numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('txt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}
function checkTime(i)
{
if (i<10)
{i="0" + i}
return i
}
</script>
</head>
显示动态时间<br>
<body onload="startTime()">
<div id="txt"></div>
<script type="text/javascript">
var d=new Date()
var weekday=new Array(7)
weekday[0]="Sunday"
weekday[1]="Monday"
weekday[2]="Tuesday"
weekday[3]="Wednesday"
weekday[4]="Thursday"
weekday[5]="Friday"
weekday[6]="Saturday"
document.write("Today it is " + weekday[d.getDay()])
</script>
<br>
将当前日期转换成字符串<br>
<script type="text/javascript">
var d = new Date()
document.write (d.toUTCString())
</script>
</body>
</html>
展开全部
<html>
<head>
<script
type="text/javascript">
function
startTime()
{
var
today=new
Date()
var
h=today.getHours()
var
m=today.getMinutes()
var
s=today.getSeconds()
//
add
a
zero
in
front
of
numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('txt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}
function
checkTime(i)
{
if
(i<10)
{i="0"
+
i}
return
i
}
</script>
</head>
显示动态时间<br>
<body
onload="startTime()">
<div
id="txt"></div>
<script
type="text/javascript">
var
d=new
Date()
var
weekday=new
Array(7)
weekday[0]="Sunday"
weekday[1]="Monday"
weekday[2]="Tuesday"
weekday[3]="Wednesday"
weekday[4]="Thursday"
weekday[5]="Friday"
weekday[6]="Saturday"
document.write("Today
it
is
"
+
weekday[d.getDay()])
</script>
<br>
将当前日期转换成字符串<br>
<script
type="text/javascript">
var
d
=
new
Date()
document.write
(d.toUTCString())
</script>
</body>
</html>
<head>
<script
type="text/javascript">
function
startTime()
{
var
today=new
Date()
var
h=today.getHours()
var
m=today.getMinutes()
var
s=today.getSeconds()
//
add
a
zero
in
front
of
numbers<10
m=checkTime(m)
s=checkTime(s)
document.getElementById('txt').innerHTML=h+":"+m+":"+s
t=setTimeout('startTime()',500)
}
function
checkTime(i)
{
if
(i<10)
{i="0"
+
i}
return
i
}
</script>
</head>
显示动态时间<br>
<body
onload="startTime()">
<div
id="txt"></div>
<script
type="text/javascript">
var
d=new
Date()
var
weekday=new
Array(7)
weekday[0]="Sunday"
weekday[1]="Monday"
weekday[2]="Tuesday"
weekday[3]="Wednesday"
weekday[4]="Thursday"
weekday[5]="Friday"
weekday[6]="Saturday"
document.write("Today
it
is
"
+
weekday[d.getDay()])
</script>
<br>
将当前日期转换成字符串<br>
<script
type="text/javascript">
var
d
=
new
Date()
document.write
(d.toUTCString())
</script>
</body>
</html>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询