首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

初学者有关问题,请各位帮忙

2012-03-29 
菜鸟问题,请各位帮忙fori0toroot.childNodes.lengthlableroot.childNodes(i).getAttribute( label )fo

菜鸟问题,请各位帮忙
for   i   =   0     to     root.childNodes.length
lable   =   root.childNodes(i).getAttribute( "label ")
for   j   =   0     to     root.childNodes(i).childNodes.length
Response.Write(j)
sm   =   root.childNodes(i).childNodes(j).getAttribute( "sm ")
url   =   root.childNodes(i).childNodes(j).getAttribute( "urls ")
times   =   root.childNodes(i).childNodes(j).getAttribute( "time ")
subLable   =   root.childNodes(i).childNodes(j).getAttribute( "label ")
                  next
sql= "insert   into   folder([label],[SubLabel],[Sm],[Time],[Url])values( ' "&lable& " ', ' "&subLable& " ', ' "&sm& " ', ' "&times& " ', ' "&url& " ') "      
conn.execute     sql  
next

这个两层循环中j的值为01,不知怎么回事,请帮帮忙

[解决办法]
for循环的结束条件是length-1

热点排行