初学asp,asp是解释执行的为for循环中的html代码是静态的为什么也会随着循环而增加,iis不是只认vbscript代码吗,无法理解循环语句?
<% if strAction="find" then'搜索结果列表显示
set rs=Conn.execute(str_sel_sql)
iRecCount=0
do while not rs.eof
%>
<tr>
<td width="80" height="25" class="common_td">
<%=rs("PO")%>
</td>
<td class="common_td" width="100">
<a href="sheet_Audit.asp?action=disp&LotNo=<%=rs("LotNo")%>&MaterielNo=<%=rs("MaterielNo")%>" target="_blank" title="查看填写质检单信息!"><%=rs("LotNo")%></a>
</td>
<td class="common_td" width="80" >
<%=rs("MaterielNo")%>
</td>
<td class="common_td" width="260">
<%=rs("MaterieDesc")%>
</td>
<td class="common_td" width="190">
<%=rs("VendorName")%>
</td>
<td class="common_td" width="50">
<%=rs("Quantity")%>
</td>
<td class="common_td" width="130">
<%=rs("InspectDate")%>
</td>
<td class="common_td" width="60">
<%if rs("Status")=5 then
response.write "未审核"
elseif rs("Status")=8 then
response.write "已审核"
end if
%>
</td>
</tr>
<% rs.movenext
iRecCount=iRecCount+1
loop
rs.close
set rs=nothing
end if
%>
<% if strAction="find" then'搜索结果列表显示
set rs=Conn.execute(str_sel_sql)
iRecCount=0
do while not rs.eof
%>
<tr>
<td width="80" height="25" class="common_td">
<%=rs("PO")%>
</td>
<td class="common_td" width="100">
<a href="sheet_Audit.asp?action=disp&LotNo=<%=rs("LotNo")%>&MaterielNo=<%=rs("MaterielNo")%>" target="_blank" title="查看填写质检单信息!"><%=rs("LotNo")%></a>
</td>
<td class="common_td" width="80" >
<%=rs("MaterielNo")%>
</td>
<td class="common_td" width="260">
<%=rs("MaterieDesc")%>
</td>
<td class="common_td" width="190">
<%=rs("VendorName")%>
</td>
<td class="common_td" width="50">
<%=rs("Quantity")%>
</td>
<td class="common_td" width="130">
<%=rs("InspectDate")%>
</td>
<td class="common_td" width="60">
<%if rs("Status")=5 then
response.write "未审核"
elseif rs("Status")=8 then
response.write "已审核"
end if
%>
</td>
</tr>
<% rs.movenext
iRecCount=iRecCount+1
loop
rs.close
set rs=nothing
end if
%>
解决方案 »
- FireFox中ActiveXObject is not defined的问题
- action 中如何获取 ajax从前台传来的json字符串
- struts2能否自动生成多个重复表单,一次提交更新Action里的List里的多个同类对象
- JSP传递值的问题
- jsf datatable中的selectBooleanCheckbox全选及删除问题!
- 请各位大夹帮忙,小弟初用~~~
- 哪位有电子版HTML的书?急用啊!!!
- 请问 关于jsp post 一个XML 文件格式信息的方法
- 我在jsp页中使用了JavaBean然后报如下错误,请高人指点是哪里出了错误?
- 关于JSP的开发环境
- 主外键关联
- 包含文件里的文字乱码.
你这个不是输出一个列表,当然循环RS,重复输出TR