在Dreamwear中怎么调用sub函数,输出正确结果

来源:百度知道 编辑:UC知道 时间:2024/05/29 20:39:07
<html>
<head>
<title>111</title>
</head>
<body>
<script language="vbscript">
sub twostotal()
dim j,total
for j=2 to 10 step 2
total=total+j
next
msgbox"总和为" & total & "."
end sub
</script>
</body>
</html>

直接用过程名就行
<script language="vbscript">
sub twostotal()
dim j,total
for j=2 to 10 step 2
total=total+j
next
msgbox"总和为" & total & "."
end sub
twostotal()
</script>