asp 高手请进 急急急急急!!!!

2025-02-02 02:09:21
推荐回答(4个)
回答1:

兄弟,我发一段代码,你自己看看,理解意思以后自己随便怎么排都行。


<%
if idid<>"" then
response.Write("")
hangge=4 '一排显示条数
article=12 '本页显示条数
topiclen=15 '每条限制字数
Picture_width=180 '图片的宽度
Picture_height=122 '图片的高度
web_url="Details.asp?id="&idid '图片的连接
Page_url="ProductsSmall.asp?id="&idid '翻页的连接
set rs=server.CreateObject("adodb.recordset")
sql = "select id,parent,newsort,newspic,topic from viewnews where newsort="&idid&" and shenghe=1 and newspic<>'' order by istop desc,tjnews desc,px asc,id desc"
rs.open sql,conn,1,1
Totalarticle=rs.recordcount
if rs.recordcount>0 then
rs.pagesize=article
Totalpage=rs.pagecount
if request("page")<>"" then
page=int(request("page"))
else
page=1
end if
rs.absolutepage=page
for liebiao = 1 to rs.pagesize
%>

<%
if liebiao mod hangge = 0 then
response.Write("")
end if
rs.movenext
If rs.EOF Then Exit For
next
else
Totalarticle=0
end if
rs.close
set rs=nothing%>

 









" target="_blank" title="<%=rs("topic")%>">" width="<%=Picture_width%>" height="<%=Picture_height%>" style="border:1px solid #cdcdcd;">
" target="_blank" title="<%=rs("topic")%>"><%=left(rs("topic"),topiclen)%>

<%
if Totalarticle=0 then
response.Write("   资料正在整理中... ...")
end if
%>

<%end if%>

回答2:

改成这样看看 (TypeData这个没看到具体的代码)
IF s<1 Then s=0
For ii=MaxperPage*(Page-1) To s
TempText=TempText&""

Temp=""&TypeData(7,ii)&"·"&TypeData(2,ii)&""&left(TypeData(6,ii),30)&""
IF TypeData(4,ii)="yes" Then Temp=""&Temp&""
TempText=TempText&Temp&""&TypeData(3,ii)&""&TypeData(5,ii)&""if i mod 3 = 0 then
&""
end if
Next

回答3:

太乱了点吧

回答4:

不要用table排啦,采用DIV+CSS吧.


    <% for... %>
  • subject

  • <% next %>


CSS里加上
li.subject_list {
float:left;
width:1/3宽度;
height:行高;
list-style-type:none;
margin:0px;
}