请高手帮我解释一下这几句asp语句?

来源:百度知道 编辑:UC知道 时间:2024/06/08 13:35:43
帮我解释一下2与3句就行了
其中的webimg12是从数据库中取出来的指的是:
<P><FONT face=Verdana>后台加入</FONT></P>
完整代码如下:
1.Dim strIntro
2.For i = 1 To Request.Form("webimg12").Count
3.strIntro = strIntro & Request.Form("webimg12")(i)
Next
rs("webimg12")=strIntro
rs("weburl")=trim(request.form("weburl"))
rs.update
rs.close
set rs=nothing
response.Write "<script language=javascript>alert('修改成功');history.go(-1);</script>"
end if%>

1.Dim strIntro '定义一个变量名称为strIntro
2.For i = 1 To Request.Form("webimg12").Count 'for循环Request.Form("webimg12").Count 计算上一个表单传递过来的名称为webimg12的控件总数 从1自加到Request.Form("webimg12").Count
3.strIntro = strIntro & Request.Form("webimg12")(i) '为变量strIntro赋值 变量的值是上以表单名称为webimg12的控件的值 从第一个值开始一直到最后一个值
Next '如果没有跳出循环则返回for语句 继续执行循环
rs("webimg12")=strIntro '字段webimg12的值等于变量strIntro的值
rs("weburl")=trim(request.form("weburl")) '字段weburl的值为上一表单传递过来的名称为weburl控件的值
rs.update '更新表中字段的值
rs.close '关闭操作对象
set rs=nothing '清空操作对象
response.Write "<script language=javascript>alert('修改成功');history.go(-1);</script>" '显示一个修改成功的弹出窗口单机确定后返回上一页
end if'结束if语句%>

上楼兄弟对了