Saturday, 16 February 2013

How to time-based greeting message using VBScript


Program:
<!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>

Output:
If time is 2/16/2013 10:27:03 AM then the message will be...
2/16/2013 10:27:03 AM
Good Morning!

Thanks for watching...Comment it...

No comments:

Post a Comment