asp代码,1行显示2条信息
<TABLEcellPadding=0cellSpacing=0class="ML_Titlebg"><TR><TDheight=2><IMGsrc='../img/1x...
<TABLE cellPadding=0 cellSpacing=0 class="ML_Titlebg">
<TR><TD height=2><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
dim rs_links,sqltext4,i
set rs_links=server.createobject("adodb.recordset")
sqltext4="select top 10 * from Bs_Links order by id desc"
rs_links.open sqltext4,conn,1,1
i=0
do while not rs_links.eof
%>
<TR vAlign=center>
<TD align='center' class='ML_Tdbg'>
<a href="<%=rs_links("link")%>" title="<%=rs_links("note")%>"target="_blank"><%=rs_links("name")%></a></TD>
</TR>
<TR><TD class='TdDotted'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
rs_links.movenext
i=i+1
if i=10 then exit do
loop
rs_links.close
%>
</TABLE>
代码在上面,每行只显示1个友情链接,现在每行想要居中显示2个,请问怎样修改? 展开
<TR><TD height=2><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
dim rs_links,sqltext4,i
set rs_links=server.createobject("adodb.recordset")
sqltext4="select top 10 * from Bs_Links order by id desc"
rs_links.open sqltext4,conn,1,1
i=0
do while not rs_links.eof
%>
<TR vAlign=center>
<TD align='center' class='ML_Tdbg'>
<a href="<%=rs_links("link")%>" title="<%=rs_links("note")%>"target="_blank"><%=rs_links("name")%></a></TD>
</TR>
<TR><TD class='TdDotted'><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
rs_links.movenext
i=i+1
if i=10 then exit do
loop
rs_links.close
%>
</TABLE>
代码在上面,每行只显示1个友情链接,现在每行想要居中显示2个,请问怎样修改? 展开
1个回答
展开全部
<TABLE cellPadding=0 cellSpacing=0 class="ML_Titlebg">
<TR><TD height=2 colspan="2"><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
dim rs_links,sqltext4,i
set rs_links=server.createobject("adodb.recordset")
sqltext4="select top 10 * from Bs_Links order by id desc"
rs_links.open sqltext4,conn,1,1
i=0
do while not rs_links.eof
%>
<TR vAlign=center>
<%
if not rs_links.eof then
link=rs_links("link")
note=rs_links("note")
name1=rs_links("name")
else
link=""
note=""
name1=""
end if
for j=1 to 2%>
<TD align='center' class='ML_Tdbg'携州 colspan="物盯2">
<a href="<%=link%>" title="<%=note%>"target="_blank"><%=name1%></a>
</TD>
<%
if not rs_links.eof then rs_links.movenext
next
%>
</TR>
<TR><TD class='TdDotted' colspan="2"><IMG src='../罩隐和img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
i=i+1
if i=10 then exit do
loop
rs_links.close
%>
</TABLE>
<TR><TD height=2 colspan="2"><IMG src='../img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
dim rs_links,sqltext4,i
set rs_links=server.createobject("adodb.recordset")
sqltext4="select top 10 * from Bs_Links order by id desc"
rs_links.open sqltext4,conn,1,1
i=0
do while not rs_links.eof
%>
<TR vAlign=center>
<%
if not rs_links.eof then
link=rs_links("link")
note=rs_links("note")
name1=rs_links("name")
else
link=""
note=""
name1=""
end if
for j=1 to 2%>
<TD align='center' class='ML_Tdbg'携州 colspan="物盯2">
<a href="<%=link%>" title="<%=note%>"target="_blank"><%=name1%></a>
</TD>
<%
if not rs_links.eof then rs_links.movenext
next
%>
</TR>
<TR><TD class='TdDotted' colspan="2"><IMG src='../罩隐和img/1x1_pix.gif' width=3 height=1></TD></TR>
<%
i=i+1
if i=10 then exit do
loop
rs_links.close
%>
</TABLE>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询