如何用ASP.NET制作一个网页,内容是:欢迎你!显示动态时间
通过HTTP可以查看要求所有步骤,满意会追加分的哦。本人是零基础,想看这东西具体怎么操作。谢谢...
通过HTTP可以查看
要求所有步骤,满意会追加分的哦。本人是零基础,想看这东西具体怎么操作。谢谢 展开
要求所有步骤,满意会追加分的哦。本人是零基础,想看这东西具体怎么操作。谢谢 展开
展开全部
在网上找到了一下代码
<body onload= "goforit() ">
<script>
var dayarray=new Array( "Sunday ", "Monday ", "Tuesday ", "Wednesday ", "Thursday ", "Friday ", "Saturday ")
var montharray=new Array( "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December ")
function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym <10)
daym= "0 "+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn= "AM "
if (hours> =12)
dn= "PM "
if (hours> 12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes <=9)
minutes= "0 "+minutes
if (seconds <=9)
seconds= "0 "+seconds
//change font size here
var cdate= " <small> <font color= '000000 ' face= 'Arial '> <b> "+dayarray[day]+ ", "+montharray[month]+ " "+daym+ ", "+year+ " "+hours+ ": "+minutes+ ": "+seconds+ " "+dn
+ " </b> </font> </small> "
if (document.all)
document.all.clock.innerHTML=cdate
else
document.write(cdate)
}
if (!document.all)
getthedate()
function goforit(){
if (document.all)
setInterval( "getthedate() ",1000)
}
</script>
<span id= "clock "> </span>
</body>
<body onload= "goforit() ">
<script>
var dayarray=new Array( "Sunday ", "Monday ", "Tuesday ", "Wednesday ", "Thursday ", "Friday ", "Saturday ")
var montharray=new Array( "January ", "February ", "March ", "April ", "May ", "June ", "July ", "August ", "September ", "October ", "November ", "December ")
function getthedate(){
var mydate=new Date()
var year=mydate.getYear()
if (year < 1000)
year+=1900
var day=mydate.getDay()
var month=mydate.getMonth()
var daym=mydate.getDate()
if (daym <10)
daym= "0 "+daym
var hours=mydate.getHours()
var minutes=mydate.getMinutes()
var seconds=mydate.getSeconds()
var dn= "AM "
if (hours> =12)
dn= "PM "
if (hours> 12){
hours=hours-12
}
if (hours==0)
hours=12
if (minutes <=9)
minutes= "0 "+minutes
if (seconds <=9)
seconds= "0 "+seconds
//change font size here
var cdate= " <small> <font color= '000000 ' face= 'Arial '> <b> "+dayarray[day]+ ", "+montharray[month]+ " "+daym+ ", "+year+ " "+hours+ ": "+minutes+ ": "+seconds+ " "+dn
+ " </b> </font> </small> "
if (document.all)
document.all.clock.innerHTML=cdate
else
document.write(cdate)
}
if (!document.all)
getthedate()
function goforit(){
if (document.all)
setInterval( "getthedate() ",1000)
}
</script>
<span id= "clock "> </span>
</body>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
插入一个label控件 Label1.Text = "〖" + DateTime.Now.ToString("yyyy年MM月dd日") + "" + DateTime.Today.DayOfWeek.ToString() + "〗";
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
动态时间.可以到网上找一个FLASH时钟放上去
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询