注册 登录
编程论坛 ASP技术论坛

继续 请教 大家 !!!~

faint_路漫漫 发布于 2008-05-21 18:50, 507 次点击
<!--  -->是注释符,里面的内容不执行   但是为什么 下述程序非得放在这个符号里面才可以啊
<head>
<title>采用框架的实用成绩查询网页</title>
<script language="vbscript">
<!--
sub query_onclick
dim msg
msg=""
if form1.stid.value="" then  
msg="请输入学号!"
form1.stid.focus
elseif len(form1.stid.value)<8 or not isnumeric(form1.stid.value) then
msg="学号不符合规范!请重新输入"
form1.stid.focus
elseif form1.course.value="" then msg="课程不能为空"
form1.course.focus
end if
if msg="" then
form1.submit
else
alert(msg)
end if
end sub

sub reset_onclick
form1.stid.value=""
form1.course.value=""
form1.stid.focus
end sub
-->
</script>
</head>
5 回复
#2
madpbpl2008-05-21 19:51
<!--  -->是 HTML 注释符,不是所有的注释符都一样的
#3
multiple19022008-05-21 19:55
防止不识别script标记的旧版本浏览器将script的内容显示出来。
#4
faint_路漫漫2008-05-21 19:58
<script language="vbscript">
</script>放在这个里面就是可执行的了吗??
#5
multiple19022008-05-21 20:00
对的。在客户端浏览器执行。这个问题与asp关系确实不大对吧?
#6
faint_路漫漫2008-05-21 21:11
回复 5# 的帖子
- -!!
我初学的  谢谢斑竹指教
1