D
dez_0609
Unregistered / Unconfirmed
GUEST, unregistred user!
刚学ASP,请大家帮我看看这段代码错在哪里?
<td width="15%">
<% if rs("author")="" then
response.write "不祥"
else
response.write rs("author")
end if %>
</td>
整段代码如下:
<%
sub showContent
dim i
%>
<div align="center"><center><table border="1" cellspacing="0" width="94%" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF">
<tr>
<td width="26%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>图书书名</strong></font></td>
<td width="12%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>分类</strong></font></td>
<td width="15%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>作者</strong></font></td>
<td width="25%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>出版社</strong></font></td>
<td width="10%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>出版年份</strong></font></td>
<td width="8%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>状态</strong></font></td>
</tr>
<%for i=1 to currentcount%>
<tr>
<td width="26%" height="23"><p align="center"><%=rs("name")%></td>
<td width="12%"><%=rs("classname")%> </td>
<td width="15%">
<% if rs("author")="" then
response.write "不祥"
else
response.write rs("author")
end if %>
</td>
<td width="25%"><p align="center"><%=rs("concern")%></td>
<td width="10%"><p align="center"><%=rs("outdate")%></td>
<td width="8%"><p align="center"><%=rs("state")%></td>
</tr>
<% rs.movenext
if rs.EOF and rs.bof then
exit for
next
%>
</table>
</center></div>
<% end sub %>
<td width="15%">
<% if rs("author")="" then
response.write "不祥"
else
response.write rs("author")
end if %>
</td>
整段代码如下:
<%
sub showContent
dim i
%>
<div align="center"><center><table border="1" cellspacing="0" width="94%" bgcolor="#F0F8FF" bordercolorlight="#4DA6FF" bordercolordark="#ECF5FF">
<tr>
<td width="26%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>图书书名</strong></font></td>
<td width="12%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>分类</strong></font></td>
<td width="15%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>作者</strong></font></td>
<td width="25%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>出版社</strong></font></td>
<td width="10%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>出版年份</strong></font></td>
<td width="8%" align="center" bgcolor="#0080C0"><font color="#FFFFFF"><strong>状态</strong></font></td>
</tr>
<%for i=1 to currentcount%>
<tr>
<td width="26%" height="23"><p align="center"><%=rs("name")%></td>
<td width="12%"><%=rs("classname")%> </td>
<td width="15%">
<% if rs("author")="" then
response.write "不祥"
else
response.write rs("author")
end if %>
</td>
<td width="25%"><p align="center"><%=rs("concern")%></td>
<td width="10%"><p align="center"><%=rs("outdate")%></td>
<td width="8%"><p align="center"><%=rs("state")%></td>
</tr>
<% rs.movenext
if rs.EOF and rs.bof then
exit for
next
%>
</table>
</center></div>
<% end sub %>