衡阳169医院骨科好吗:寻求网页时间代码

来源:百度文库 编辑:神马品牌网 时间:2024/04/30 10:49:48
寻求网页时间代码。以便在网页中看到现在几点了!
我要的时间格式为:
例:来宾,你好!现在时间:2006年5月3日 15:30
谢谢!
我是编代码做网页的,而不是用任何网页制作软件来做的。)有哪位大师懂的话麻烦留下代码好吗??是否留有“时间”代码这是此问题的悬赏标准!!
对!最好还在“日”后面;加上 星期!快点啊!谢谢了! :)
我要的时间是放在网页中的,不是放在状态栏或标题中!谢谢

时间当然不要一秒一秒地动了!!!:)

<Script Language="VBScript">
Dim Mytime
Function Showtime()
Mytime=""
Mytime="来宾,你好!现在时间:" & Year(date()) & "年" & Month(date()) & "月" & Day(date()) & "日" & " " & time()
Window.status=Mytime
Window.SetTimeOut "Showtime()",500
End function
</Script>
以上代码插入到<head></head>之间.改<body onload="Showtime()">
时间和日期会在IE的状态栏显示.500毫秒刷新一次.

<script language =javascript>
var t=New Date
t1=t.new data(GetYear)
t1=t.new data(GetMonth)

...
</script>

应该差不多吧``
这个是格式:
ateObj = new Date()
dateObj = new Date(dateVal)
dateObj = new Date(year, month, date[, hours[, minutes[, seconds[,ms]]]])


function DateDemo(){
var d, s = "Today's date is: "; // 声明变量。
d = new Date(); // 创建 Date 对象。
s += (d.getMonth() + 1) + "/"; // 获取月份。
s += d.getDate() + "/"; // 获取日。
s += d.getYear(); // 获取年份。
return(s); // 返回日期。
}

<!-- Begin
function Year_Month(){
var now = new Date();
var yy = now.getYear();
var mm = now.getMonth()+1;
var cl = '<font color="#000000">';
return(cl +yy + '年' + mm + '月</font>');
}function Date_of_Today(){
var now = new Date();
var cl = '<font color="#000000"><b>';
if (now.getDay() == 0) cl = '<font color="#FF0000"><b>';
if (now.getDay() == 6) cl = '<font color="#008000"><b>';
return(cl +now.getDate() + '</font></b>');
}function Day_of_Today(){
var day = new Array();
day[0] = "星期日";
day[1] = "星期一";
day[2] = "星期二";
day[3] = "星期三";
day[4] = "星期四";
day[5] = "星期五";
day[6] = "星期六";
var now = new Date();
var cl = '<font color="#000000">';
if (now.getDay() == 0) cl = '<font color="#FF0000">';
if (now.getDay() == 6) cl = '<font color="#008000">';

return(cl +day[now.getDay()] + '</font>');
}function CurentTime(){
var now = new Date();
var hh = now.getHours();
var mm = now.getMinutes();
var ss = now.getTime() % 60000;
ss = (ss - (ss % 1000)) / 1000;
var clock = hh+':';
if (mm < 10) clock += '0';
clock += mm+':';
if (ss < 10) clock += '0';
clock += ss;
return(clock);
}function refreshCalendarClock(){
document.all.calendarClock1.innerHTML = Year_Month();
document.all.calendarClock2.innerHTML = Date_of_Today();
document.all.calendarClock3.innerHTML = Day_of_Today();
document.all.calendarClock4.innerHTML = CurentTime();
}document.write('<table border="0" cellpadding="0" cellspacing="0" width="66" bgcolor="#C0C0C0" height="70">');
document.write('<tr><td valign="top" width="100%" height="100%">');
document.write('<table border="0" bordercolor="#000000" cellpadding="0" cellspacing="0" width="63" bgcolor="#FFFF99" height="67">');
document.write('<tr><td align="center" width="100%" height="100%" >');
document.write('<font id="calendarClock1" style="font-family:宋体;font-size:9pt;line-height:120%"> </font><br>');
document.write('<font id="calendarClock2" style="font-family:Arial;font-size:18pt;line-height:120%"> </font><br>');
document.write('<font id="calendarClock3" style="font-family:宋体;font-size:9pt;line-height:120%"> </font><br>');
document.write('<font id="calendarClock4" style="color:#000000;font-family:宋体;font-size:9pt;line-height:120%"><b> </b></font>');
document.write('</td></tr></table>');
document.write('</td></tr></table>');
refreshCalendarClock()
setInterval('refreshCalendarClock()',1000);

时间能一秒一秒的动吗?