发布网友 发布时间:2022-04-21 23:22
共1个回答
热心网友 时间:2023-06-26 01:33
网页显日期!
如果是Html网页的话:加入js代码!
<SCRIPT language="">
function y2k(number) { return (number < 1000) ? number + 1900 : number; }
var now = new Date();
var dd = now.getDate() , mt = now.getMonth() + 1 , yy = y2k(now.getYear()) , weekVal = now.getDay();
if (weekVal==0)
msg1="星期日";
else if (weekVal==1)
msg1="星期一";
else if (weekVal==2)
msg1="星期二";
else if (weekVal==3)
msg1="星期三";
else if (weekVal==4)
msg1="星期四";
else if (weekVal==5)
msg1="星期五";
else if (weekVal==6)
msg1="星期六";
document.write("<table width=80 border=0 cellspacing=0 cellpadding=0><tr bgcolor=#000000><td height=80>");
document.write("<table width=100% border=0 bgcolor=#FFFFFF align=center><tr align=center><td height=80>\n");
document.write('<span STYLE="FONT-FAMILY: 宋体; FONT-SIZE: 9.5pt; color: black">\n');
document.write(yy+"年"+mt+"月<br>");
document.write('<font color=#FF0000><b><font face="Arial, Helvetica, sans-serif">');
document.write(dd+"</font></b></font><br>");
document.write(msg1+"</span></td></tr></table></td></tr></table>");
</SCRIPT>
如果是asp文件:<%=date()%>
每日空气质量,一样需要采用天气小偷!
打字不易,如满意,望采纳。