asp问题,请高手帮忙看看这段代码 急..在线等
<%Ifrs("photo_x_flag")=1andrs("photo_d_flag")=1Then'大小都有response.write"<table><tr><td...
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
response.write"<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>"
ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then'有小无大
response.write "<table>
<tr>
<td><a href=photo/"&rs("photo_x")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>"
ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小
response.write "<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_d")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>"
end if
%>
错误类型:
Microsoft VBScript 编译器错误 (0x800A0409)
未结束的字符串常量
/wr/ceshi/index.asp, line 310, column 24
response.write"<table>
-----------------------^
到底错在哪里啊?怎么修改
问题补充:小弟是新手! 展开
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
response.write"<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>"
ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then'有小无大
response.write "<table>
<tr>
<td><a href=photo/"&rs("photo_x")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>"
ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小
response.write "<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_d")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>"
end if
%>
错误类型:
Microsoft VBScript 编译器错误 (0x800A0409)
未结束的字符串常量
/wr/ceshi/index.asp, line 310, column 24
response.write"<table>
-----------------------^
到底错在哪里啊?怎么修改
问题补充:小弟是新手! 展开
展开全部
其实 ddxxz 说的很对了就是response.write "" 中的字符串不能换行,ASP的语句和VB一个道理,同一个语句不能换行。
更改如下:
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_x")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小 %>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_d")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
end if
%>
更改如下:
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_x")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小 %>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_d")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
end if
%>
展开全部
这样比较合理:
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then'有小无大
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_x")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_d")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
end if
%>
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then'有小无大
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_x")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_d")%> width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
end if
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
把response.write都去掉看看
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then%>'大小都有
<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>
<%ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then%>'有小无大
<table>
<tr>
<td><a href=photo/"&rs("photo_x")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table><%ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then%>'有大无小
<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_d")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>
<%
end if
%>
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then%>'大小都有
<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>
<%ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then%>'有小无大
<table>
<tr>
<td><a href=photo/"&rs("photo_x")&" target=_blank><img src=photo/"&rs("photo_x")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table><%ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then%>'有大无小
<table>
<tr>
<td><a href=photo/"&rs("photo_d")&" target=_blank><img src=photo/"&rs("photo_d")&" width=100 height=75 border=0 hspace=4 vspace=4 alt=网名:"&rs("username")&"></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID="&rs("id")&" target=_blank class=6hui_l>"&htmlout(ChkBadWords(rs("username")))&"</a></td>
</tr>
</table>
<%
end if
%>
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
不可以这样写的..
你 Response.Write "<table> 这里换行了。
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs
("username")))%></a></td>
</tr>
</table>"
ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then'有小无大
response.write "<table>
<tr>
<td><a href=photo/<%=rs("photo_x")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs
("username")))%></a></td>
</tr>
</table>"
ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小
response.write "<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_d")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
end if
%>
你 Response.Write "<table> 这里换行了。
<%
If rs("photo_x_flag")=1 and rs("photo_d_flag")=1 Then'大小都有
%>
<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs
("username")))%></a></td>
</tr>
</table>"
ElseIf rs("photo_x_flag")=1 and rs("photo_d_flag")=0 Then'有小无大
response.write "<table>
<tr>
<td><a href=photo/<%=rs("photo_x")%> target=_blank><img src=photo/<%=rs("photo_x")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs
("username")))%></a></td>
</tr>
</table>"
ElseIf rs("photo_d_flag")=1 and rs("photo_x_flag")=0 Then'有大无小
response.write "<table>
<tr>
<td><a href=photo/<%=rs("photo_d")%> target=_blank><img src=photo/<%=rs("photo_d")%> width=100
height=75 border=0 hspace=4 vspace=4 alt=网名:<%=rs("username")%>></a></td>
</tr>
<tr>
<td><a href=Display.asp?MemberID=<%=rs("id")%> target=_blank class=6hui_l><%=htmlout(ChkBadWords(rs("username")))%></a></td>
</tr>
</table>
<%
end if
%>
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询