使用vbscript制作基于时间的问候语

代码:

<!DOCTYPE html>

<html>

<body>

<%

dim h

h=hour(now())

 

response.write("<p>" & now())

response.write("</p>")

If h<12 then

   response.write("Good Morning!")

else

   response.write("Good day!")

end if

%>

</body>

</html>

结果:

9/20/2013 11:08:35 PM

Good day!

相关文章