请各位高手帮忙asp代码修改网页制作
<tablewidth="350"border="0"align="left"cellpadding="0"cellspacing="0"style="border:1p...
<table width="350" border="0" align="left" cellpadding="0" cellspacing="0" style="border:1px solid #CCCCCC; padding-left:1px; padding-top:1px;">
<tr>
<td><%set rss=server.CreateObject("adodb.recordset")
rss.open "select top 1 * from news where N_class=15 and indexhot=1 and Flag=1 and n_pic<>'' order by N_id desc",conn,1,1
if not rss.eof then%>
<table width="100%" height="81" border="0" cellpadding="0" cellspacing="0" style="margin-top:3px;">
<tr>
<td width="35%" height="81" align="center" valign="top"><a href="<%if isnull(rss("n_url")) or rss("n_url")="" then%> newsshow.asp?big=<%=rss("n_class")%>&small=<%=rss("N_Sortid")%>&id=<%=rss("N_id")%> <%else%><%=rss("n_url")%><%end if%>" target="_blank" > <img src="UploadFile/News_Title/<%=rss("N_pic")%>" width="82" height="70" border="0"></a></td>
<td width="65%" valign="top" style="padding-top:5px;"> <a href="<%if isnull(rss("n_url")) or rss("n_url")="" then%> newsshow.asp?big=<%=rss("n_class")%>&small=<%=rss("N_Sortid")%>&id=<%=rss("N_id")%> <%else%><%=rss("n_url")%><%end if%>" target="_blank" style="color:#333333; font-weight:bold;"> <%=left(trim(rss("n_name")),14)%></a><br />
<p style="margin-top:3px; line-height:18px; color:#666666"> <%=left(rss("N_Address"),33)&"..."%></p></td>
</tr>
</table>
<%
end if
rss.close
set rss=nothing
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 4 * from news where N_class=15 and N_Special=1 and Flag=1 order by N_id desc",conn,3,3
ii=1
do while not rs.eof
%>
<td><table width="123px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" align="center" style="font-size:10px;">·</td>
<td width="95%" height="24"><a href="<%if isnull(rs("n_url")) or rs("n_url")="" then%> newsshow.asp?big=<%=rs("n_class")%>&small=<%=rs("N_Sortid")%>&id=<%=rs("N_id")%> <%else%><%=rs("n_url")%><%end if%>" target="_blank" style="color:<%=rs("color")%>; font-size:<%=rs("fontsize")%>px; font-weight:<%if isnull(rs("bold")) or rs("bold")="" then%>normal <%else%>bold<%end if %>"> <%=left(trim(rs("n_name")),9)%></a></td>
</tr>
</table></td>
<%
if ii mod 2=0 then
response.Write("</tr>")
end if
rs.movenext
ii=ii+1
loop
rs.close
set rs=nothing
%>
</tr>
</table></td>
</tr>
</table>
我想让主页显示添加一个就多出一个。 我现在添加在首页只显示一个。 麻烦各位帮帮忙
我用你们的方法试了 添加新的把旧的替换了。各位高手帮帮忙了。 展开
<tr>
<td><%set rss=server.CreateObject("adodb.recordset")
rss.open "select top 1 * from news where N_class=15 and indexhot=1 and Flag=1 and n_pic<>'' order by N_id desc",conn,1,1
if not rss.eof then%>
<table width="100%" height="81" border="0" cellpadding="0" cellspacing="0" style="margin-top:3px;">
<tr>
<td width="35%" height="81" align="center" valign="top"><a href="<%if isnull(rss("n_url")) or rss("n_url")="" then%> newsshow.asp?big=<%=rss("n_class")%>&small=<%=rss("N_Sortid")%>&id=<%=rss("N_id")%> <%else%><%=rss("n_url")%><%end if%>" target="_blank" > <img src="UploadFile/News_Title/<%=rss("N_pic")%>" width="82" height="70" border="0"></a></td>
<td width="65%" valign="top" style="padding-top:5px;"> <a href="<%if isnull(rss("n_url")) or rss("n_url")="" then%> newsshow.asp?big=<%=rss("n_class")%>&small=<%=rss("N_Sortid")%>&id=<%=rss("N_id")%> <%else%><%=rss("n_url")%><%end if%>" target="_blank" style="color:#333333; font-weight:bold;"> <%=left(trim(rss("n_name")),14)%></a><br />
<p style="margin-top:3px; line-height:18px; color:#666666"> <%=left(rss("N_Address"),33)&"..."%></p></td>
</tr>
</table>
<%
end if
rss.close
set rss=nothing
%>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<%
set rs=server.CreateObject("adodb.recordset")
rs.open "select top 4 * from news where N_class=15 and N_Special=1 and Flag=1 order by N_id desc",conn,3,3
ii=1
do while not rs.eof
%>
<td><table width="123px" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="5%" align="center" style="font-size:10px;">·</td>
<td width="95%" height="24"><a href="<%if isnull(rs("n_url")) or rs("n_url")="" then%> newsshow.asp?big=<%=rs("n_class")%>&small=<%=rs("N_Sortid")%>&id=<%=rs("N_id")%> <%else%><%=rs("n_url")%><%end if%>" target="_blank" style="color:<%=rs("color")%>; font-size:<%=rs("fontsize")%>px; font-weight:<%if isnull(rs("bold")) or rs("bold")="" then%>normal <%else%>bold<%end if %>"> <%=left(trim(rs("n_name")),9)%></a></td>
</tr>
</table></td>
<%
if ii mod 2=0 then
response.Write("</tr>")
end if
rs.movenext
ii=ii+1
loop
rs.close
set rs=nothing
%>
</tr>
</table></td>
</tr>
</table>
我想让主页显示添加一个就多出一个。 我现在添加在首页只显示一个。 麻烦各位帮帮忙
我用你们的方法试了 添加新的把旧的替换了。各位高手帮帮忙了。 展开
2个回答
展开全部
rss.open "select top 1 * from news where N_class=15 and indexhot=1 and Flag=1 and n_pic<>'' order by N_id desc",conn,1,1
改写成
rss.open "select * from news where N_class=15 and indexhot=1 and Flag=1 and n_pic<>'' order by N_id desc",conn,1,1
改写成
rss.open "select * from news where N_class=15 and indexhot=1 and Flag=1 and n_pic<>'' order by N_id desc",conn,1,1
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询