ASP代码,调用的友情链接不能换行显示,请看看怎么改。
<%subsy_npicgundong(top,Cla,Tlink,tj)setrs=conn.execute("select*frombdnewswherenb_id=...
<%sub sy_npicgundong(top,Cla,Tlink,tj)
set rs=conn.execute("select * from bdnews where nb_id="&Cla&" and Fileurl<>'' order by nws_id desc")
if rs.eof then
response.Write "Î޼Ǽ"
else%>
<table width="630" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td id=demo1>
<table width="600" style="word-break:break-all;" height="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<%do while not rs.eof
if len(rs("nws_title"))>5 then
nws_title=left(rs("nws_title"),5)&"br"
else
nws_title=rs("nws_title")
end if
%>
<td>
<table width="130" height="48" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" class="tb"><a href="<%=rs("nws_link")%>" target="_blank"><img src="<%=replace(rs("Fileurl"),"../../","")%>" alt="<%=rs("nws_title")%>" width="127" height="40" border="0"></a></td>
</tr>
</table>
</td>
<td> </td>
<%
rs.movenext
loop
%>
</tr>
</table>
</td>
<td width="1" id=demo2 ></td>
</tr>
</table>
<%end if
rs.close
set rs=nothing
%>
<%end sub%> 展开
set rs=conn.execute("select * from bdnews where nb_id="&Cla&" and Fileurl<>'' order by nws_id desc")
if rs.eof then
response.Write "Î޼Ǽ"
else%>
<table width="630" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td id=demo1>
<table width="600" style="word-break:break-all;" height="500" border="0" cellpadding="0" cellspacing="0">
<tr>
<%do while not rs.eof
if len(rs("nws_title"))>5 then
nws_title=left(rs("nws_title"),5)&"br"
else
nws_title=rs("nws_title")
end if
%>
<td>
<table width="130" height="48" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center" valign="middle" class="tb"><a href="<%=rs("nws_link")%>" target="_blank"><img src="<%=replace(rs("Fileurl"),"../../","")%>" alt="<%=rs("nws_title")%>" width="127" height="40" border="0"></a></td>
</tr>
</table>
</td>
<td> </td>
<%
rs.movenext
loop
%>
</tr>
</table>
</td>
<td width="1" id=demo2 ></td>
</tr>
</table>
<%end if
rs.close
set rs=nothing
%>
<%end sub%> 展开
- 你的回答被采纳后将获得:
- 系统奖励15(财富值+成长值)+难题奖励10(财富值+成长值)+提问者悬赏10(财富值+成长值)
展开全部
在do前面加一行
i = 1
在loop前面加如下代码:
Cols = 4 '列数
i = i + 1
If i Mod Cols = 0 Then%>
<td></td>
</tr><%
ElseIf i Mod Cols <> 1 Then%>
<td colspan="<%=Cols - (i Mod Cols) + 1%>"></td>
</tr><%
End If
自己按需要修改Cols值
i = 1
在loop前面加如下代码:
Cols = 4 '列数
i = i + 1
If i Mod Cols = 0 Then%>
<td></td>
</tr><%
ElseIf i Mod Cols <> 1 Then%>
<td colspan="<%=Cols - (i Mod Cols) + 1%>"></td>
</tr><%
End If
自己按需要修改Cols值
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询