问题说明:IDs为一数组,查询数据库时的temp正确,而显示到页面的temp始终会加1显示,为何??
用JavaScript检测时弹出的temp也正常
for j=0 to Ubound(IDs)
dim temp
temp=IDs(j)
cmdText="select ID,NavUrl,NavNameCH from [anole_Navigation] where ParentID="&temp
rs.open cmdText,Conn,1,1
Response.Write "<div id='submenu_"&j&"' class='submenu'>"&j-1&temp&CrLf
Response.Write "<script language='javascript'>alert('"&temp&"')</script>"
while not rs.eof
Response.Write "<div><a href='"&rs("NavUrl")&"'>"&rs("NavNameCH")&"</div>"&CrLf
'response.write "<script language='javascript'>alert('c:"&rs("NavNameCH")&"');</script>"
rs.moveNext
Wend
Response.Write "</div>"
rs.close
next