试编写一个简单的ASP程序显示当时系统的日期和时间
发布网友
发布时间:2022-05-24 10:02
我来回答
共3个回答
热心网友
时间:2023-10-10 08:07
用到一段小的JS代码 绝对能用刚刚实验过
显示当前时间:
<script language="javascript">
function showtime()
{
var today,year,month,hour,minute,second;
today=new Date();
year=today.getYear();
month=today.getMonth()+1;
date=today.getDate();
hour=today.getHours();
minute=today.getMinutes();
second=today.getSeconds();
document.getElementById('time').innerHTML=year+"年"+month+"月"+date+"日"+hour+"时"+minute+"分"+second+"秒";
setTimeout("showtime();",1000)
}
</script>
<p>当前时间:<span id="time"></span></p>
<script language="javascript">showtime();</script>
热心网友
时间:2023-10-10 08:07
<%
function a(b)
a=b
if b<>"" then
a=replace(a,"上午","")
a=replace(a,"下午","")
a=replace(a,"/","-")'这裏可以根据实际需要来变动
end if
end function
response.write a(now())
%>
热心网友
时间:2023-10-10 08:08
<%
Response.Write Now 'Now时间函数;Response.Write输出函数
%>