1. 论坛系统升级为Xenforo,欢迎大家测试!
    Dismiss Notice

我这么简单的for循环到底是哪出了问题呢?

Discussion in '前端开发' started by 风狼, Mar 22, 2006.

  1. 风狼

    风狼 New Member

    Joined:
    Oct 1, 2005
    Messages:
    7,452
    Likes Received:
    25
    Do While Not objRs.eof
    Response.Write "<tr bgcolor='#eeeeee'>"
    For i=1 to 5
    Response.Write "<td align='center'>"&objRs("name")&"</td>"
    objRs.MoveNext
    Next
    esponse.Write "</tr>"
    Loop


    错误提示:
    Microsoft VBScript 编译器错误 错误 '800a03f6'
    缺少 'End'

    /iisHelp/common/500-100.asp,行242 错误 '80020009'

    发生意外。


    我只是想每行输出五个数据呀,,,

    楼下会的弟兄给我解答下吧。。应该是编程思路出了故障。。。可怜可怜我这菜鸟吧~~~~
     
  2. 小叶

    小叶 New Member

    Joined:
    Sep 4, 2005
    Messages:
    17,941
    Likes Received:
    33
    esponse.Write "</tr>"
    :) 我倒。。自己检讨

    Response.write "</tr> "
     
  3. 风狼

    风狼 New Member

    Joined:
    Oct 1, 2005
    Messages:
    7,452
    Likes Received:
    25
    呀哦。这个是我转过来时不少心删的。。这里不是问题所在
     
  4. 著名混混

    著名混混 New Member

    Joined:
    Mar 22, 2006
    Messages:
    292
    Likes Received:
    1
    每行输入5个数据似乎不是这么写的,就你的程序来说,出错不是你这里的问题,可能是你少写了end if什么的

    但是我觉得你这个程序似乎不能到每行5个数据
     
  5. 小叶

    小叶 New Member

    Joined:
    Sep 4, 2005
    Messages:
    17,941
    Likes Received:
    33
    dim i
    i=0
    do while not objRs.eof and i<6

    。。。。。。。。。中间这里自己补充完整

    i=i+1
    if i>6 then exit do
    objRs.MoveNext
    loop
     
  6. wm_chief

    wm_chief New Member

    Joined:
    Sep 5, 2005
    Messages:
    17,890
    Likes Received:
    46
    。。。
     
  7. Tameway

    Tameway New Member

    Joined:
    Sep 6, 2005
    Messages:
    1,286
    Likes Received:
    8
    程序思路正确

    其他地方问题