script type="text/vbscript问题

来源:百度知道 编辑:UC知道 时间:2024/05/24 09:28:25
为什么会啥都不显示?
代码如下:
<!-- 代码开始
<font color="red"><script type="text/vbscript">
aDay=Month(Date)
bDay=Day(Date)
if aDay = 1 then
else
if Day(Date) = 1 then
document.write("今天是元旦节")
end if
elseif aDay = 2
else
if bDay = 14
document.write("今天是情人节")
else
end if
document.write("今天不过节!")
else
end if
</script></font>
//代码结束-->

if aDay = 1 and bDay = 1 then
document.write("今天是元旦节")
elseif aDay = 2 and bDay = 14 then
document.write("今天是情人节")
else
document.write("今天不过节!")
end if

注释vbscript代码,不要把html标签注释了,也不要把VBSCRIPAT输出的文本也注释了.把注释符放在脚本内,再用脚本注释方式一下,如下的'号,在JSCTIPT中用//号,在HTML中用<!-- 内容 -->.
<font color="red">
<script type="text/vbscript">
'<!-- 代码开始
aDay=Month(Date)
bDay=Day(Date)
if aDay = 1 and Day(Date) = 1 then
document.write("今天是元旦节")
elseif aDay = 2 and bDay = 14 then
document.write("今天是情人节")
else
document.write("今天不过节!"&aDay)
end if
'代码结束-->
</script></font>