For ... Next循环乘法表从0开始

时间:2010-06-10 13:00:33

标签: asp-classic vbscript loops

我的For ... Next循环使用乘法表工作正常,但我希望左上角的框从0开始并从那里继续前进。给我一些麻烦。

dim mult

mult = "<table width = ""100%"" border= ""1"" >"

For row = 1 to 50

    mult = mult & "<tr align = ""center"" >"

    For col= 1 to 20

        mult = mult & "<td>" & row * col & "</td>"

    Next

    mult = mult & "</tr>"

Next

mult = mult & "</table>"

response.write mult

这是我到目前为止所拥有的。有什么建议吗?

1 个答案:

答案 0 :(得分:0)

只需更改此代码

即可

For row = 1 to 50

这个

For row = 0 to 50