ASP表格循环问题,烦请高手解决!
<tableonMouseover="runChgbgColor('list')"id="list"border="1"cellpadding="0"cellspacin...
<table onMouseover="runChgbgColor('list')" id="list" border="1" cellpadding="0" cellspacing="0" width="80%" style="border-collapse: collapse" bordercolor="#111111">
<tr align="center">
<td height="25"><strong><span style="font-size: 13px">器件型号</span></strong></td>
<td><strong><span style="font-size: 13px">基本参数</span></strong></td>
<td><strong><span style="font-size: 13px">厂家Logo</span></strong></td>
<td><strong><span style="font-size: 13px">Datasheet</span></strong></td>
</tr>
<tr align="center">
<td height="25"><font size="-1">
<%do while not rs.eof%>
<%'''
wfqname=rs("titledata")
if request("k")<>"" then
for i = 0 to ubound(KN)
wfqname=replace(wfqname,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%><a target=_blank href="<%=rs("httpdata")%>"><%=wfqname%></a></font></td>
<td><font size="-1">
<%if rs("bodydata")<>"" then%><%bodydata=rs("bodydata")
if request("k")<>"" and request("kt")<>"软件名称" and request("type")<>"sou" then
for i = 0 to ubound(KN)
bodydata=replace(bodydata,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%><%=bodydata%><%else%>内容正在完善中<%end if%></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("url")%>"><img src="material/images/<%=rs("logo")%>" border="0" /></a></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("httpdata")%>">下载</a></font></td>
<tr align="center">
<td height="25"><font size="-1">
<%
di=di+1
if di>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
</font></td></tr></table>
这是我一个网页搜索中的部份代码,搜索结果以表格显示出来,但搜索出来的结果总是多出一行,烦请高手帮忙解决!不胜感激!问题解决后再追加30分! 展开
<tr align="center">
<td height="25"><strong><span style="font-size: 13px">器件型号</span></strong></td>
<td><strong><span style="font-size: 13px">基本参数</span></strong></td>
<td><strong><span style="font-size: 13px">厂家Logo</span></strong></td>
<td><strong><span style="font-size: 13px">Datasheet</span></strong></td>
</tr>
<tr align="center">
<td height="25"><font size="-1">
<%do while not rs.eof%>
<%'''
wfqname=rs("titledata")
if request("k")<>"" then
for i = 0 to ubound(KN)
wfqname=replace(wfqname,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%><a target=_blank href="<%=rs("httpdata")%>"><%=wfqname%></a></font></td>
<td><font size="-1">
<%if rs("bodydata")<>"" then%><%bodydata=rs("bodydata")
if request("k")<>"" and request("kt")<>"软件名称" and request("type")<>"sou" then
for i = 0 to ubound(KN)
bodydata=replace(bodydata,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%><%=bodydata%><%else%>内容正在完善中<%end if%></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("url")%>"><img src="material/images/<%=rs("logo")%>" border="0" /></a></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("httpdata")%>">下载</a></font></td>
<tr align="center">
<td height="25"><font size="-1">
<%
di=di+1
if di>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%>
</font></td></tr></table>
这是我一个网页搜索中的部份代码,搜索结果以表格显示出来,但搜索出来的结果总是多出一行,烦请高手帮忙解决!不胜感激!问题解决后再追加30分! 展开
1个回答
展开全部
<table onMouseover="runChgbgColor('list')" id="list" border="1" cellpadding="0" cellspacing="0" width="80%" style="border-collapse: collapse" bordercolor="#111111">
<tr align="center">
<td height="25"><strong><span style="font-size: 13px">器件型号</span></strong></td>
<td><strong><span style="font-size: 13px">基本参数</span></strong></td>
<td><strong><span style="font-size: 13px">厂家Logo</span></strong></td>
<td><strong><span style="font-size: 13px">Datasheet</span></strong></td>
</tr>
<%do while not rs.eof%>
<tr align="center">
<td height="25"><font size="-1">
<%'''
wfqname=rs("titledata")
if request("k")<>"" then
for i = 0 to ubound(KN)
wfqname=replace(wfqname,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%>
<a target=_blank href="<%=rs("httpdata")%>"><%=wfqname%></a></font></td>
<td><font size="-1">
<%if rs("bodydata")<>"" then%><%bodydata=rs("bodydata")
if request("k")<>"" and request("kt")<>"软件名称" and request("type")<>"sou" then
for i = 0 to ubound(KN)
bodydata=replace(bodydata,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%><%=bodydata%><%else%>内容正在完善中<%end if%></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("url")%>"><img src="material/images/<%=rs("logo")%>" border="0" /></a></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("httpdata")%>">下载</a></font></td></tr>
<%
di=di+1
if di>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%></table>
试试这个行不行
<tr align="center">
<td height="25"><strong><span style="font-size: 13px">器件型号</span></strong></td>
<td><strong><span style="font-size: 13px">基本参数</span></strong></td>
<td><strong><span style="font-size: 13px">厂家Logo</span></strong></td>
<td><strong><span style="font-size: 13px">Datasheet</span></strong></td>
</tr>
<%do while not rs.eof%>
<tr align="center">
<td height="25"><font size="-1">
<%'''
wfqname=rs("titledata")
if request("k")<>"" then
for i = 0 to ubound(KN)
wfqname=replace(wfqname,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%>
<a target=_blank href="<%=rs("httpdata")%>"><%=wfqname%></a></font></td>
<td><font size="-1">
<%if rs("bodydata")<>"" then%><%bodydata=rs("bodydata")
if request("k")<>"" and request("kt")<>"软件名称" and request("type")<>"sou" then
for i = 0 to ubound(KN)
bodydata=replace(bodydata,""&KN(i)&"","<font color=#FF0000>"&KN(i)&"</font>")
next
end if%><%=bodydata%><%else%>内容正在完善中<%end if%></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("url")%>"><img src="material/images/<%=rs("logo")%>" border="0" /></a></font></td>
<td><font size="-1"><a target=_blank href="<%=rs("httpdata")%>">下载</a></font></td></tr>
<%
di=di+1
if di>=MaxPerPage then exit do
rs.movenext
loop
end if
rs.close
set rs=nothing
conn.close
set conn=nothing
end if
%></table>
试试这个行不行
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询