帮我写下九九乘法表的VBS脚本 没有会的吗?

来源:百度知道 编辑:UC知道 时间:2024/06/15 13:09:44
QQ365101735
就是考试题,题目就是“九九乘法表的VBS脚本”,我是一点都不懂啊,应该是网页输出吧

现时写了一个,在我这里已调试通过

<script language="vbscript">
<!--
function jiujiu()
Dim s
Dim x,y
x=1
y=1
For x = 1 To 9
s = ""
For y = 1 To 9
If y > x Then
s=""
exit for
end if
s = cstr(x) & "×" & cstr(y) & "=" & cstr(x*y) & " "
document.write "<span style='font-size:12px'>" & s & "</span>"
Next
document.write "<br/ >"
Next
End function
call jiujiu()
-->
</script>

dim i,j
for i = 1 to 9
for j = 1 to i
res = res & " " & j & "*" & i & "=" & j*i
next
res = res & chr(13)
next
msgbox res

上面代码复制到记事本保存成*.vbs为后缀名的文件就行了。网页中vbs代码一样,把msgbox换成wscript.echo就行!

是在网页上输出,还是用msgbox 输出的,我可以帮你