用Vbscript脚本语言,设计一个程序,根据当前是星期几,在页面中显示不同的问候语。
2个回答
2013-06-11
展开全部
<html>
<head><title>vbscript 日期函数</title></head>
<body>
<%
dim mydate
mydate=dateselect case weekday(mydate)
case 1
response.write"星期日"
case 2
response.write"星期一"
case 3
response.write"星期二"
case 4
response.write"星期三"
case 5
response.write"星期四"
case 6
response.write"星期五"
case 7
response.write"星期六"
end select
%>
</body></html>问候语写在星期后面即可
<head><title>vbscript 日期函数</title></head>
<body>
<%
dim mydate
mydate=dateselect case weekday(mydate)
case 1
response.write"星期日"
case 2
response.write"星期一"
case 3
response.write"星期二"
case 4
response.write"星期三"
case 5
response.write"星期四"
case 6
response.write"星期五"
case 7
response.write"星期六"
end select
%>
</body></html>问候语写在星期后面即可
2013-06-11
展开全部
那位朋友给的是 ASP 服务器端脚本我也写一个浏览器端脚本<html>
<head>
<title>vbscript 日期函数</title>
</head>
<body>
<script language="VBScript">
dim mydate
mydate=now
select case weekday(mydate)
case 1
document.write "星期日"
case 2
document.write "星期一"
case 3
document.write "星期二"
case 4
document.write "星期三"
case 5
document.write "星期四"
case 6
document.write "星期五"
case 7
document.write "星期六"
end select
</script>
</body>
</html>
<head>
<title>vbscript 日期函数</title>
</head>
<body>
<script language="VBScript">
dim mydate
mydate=now
select case weekday(mydate)
case 1
document.write "星期日"
case 2
document.write "星期一"
case 3
document.write "星期二"
case 4
document.write "星期三"
case 5
document.write "星期四"
case 6
document.write "星期五"
case 7
document.write "星期六"
end select
</script>
</body>
</html>
本回答被网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询