![](https://iknow-base.cdn.bcebos.com/lxb/notice.png)
asp内页列表后怎么显示时间代码,如何调用?
<tablewidth="650"height="84"border="0"align="center"cellpadding="0"cellspacing="0"cla...
<table width="650" height="84" border="0" align="center" cellpadding="0" cellspacing="0" class="blue">
<tr>
<td height="84" valign="top"><table width="648" height="24" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="550" height="24" valign="top">
<div align="center">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<% dim totalnews,Currentpage,totalpages,i
sqlnews="select * from article where shenghe=1 and typeid="&typeid&" order by dateandtime DESC"
set rsnews=server.createobject("adodb.recordset")
rsnews.open sqlnews,conn,1,1
if rsnews.eof and rsnews.bof then
response.write ("没有任何数据,请期待更新!")
end if%>
<%
if not rsnews.eof then
rsnews.movefirst
rsnews.pagesize=newsperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rsnews.pagecount then
currentpage=rsnews.pagecount
end if
else
currentpage=1
end if
totalnews=rsnews.recordcount
if currentpage<>1 then
if (currentpage-1)*newsperpage<totalnews then
rsnews.move(currentpage-1)*newsperpage
dim bookmark
bookmark=rsnews.bookmark
end if
end if
if (totalnews mod newsperpage)=0 then
totalpages=totalnews\newsperpage
else
totalpages=totalnews\newsperpage+1
end if
i=0
do while not rsnews.eof and i<newsperpage
%>
<tr>
<td height="26" class="style46"> <div align="left" class="style8">· <a href="show.asp?typeid=<%=rsnews("typeid")%>&id=<%=rsnews("newsid")%>" target="_blank" class="style8">
<%=left(rsnews("title"),30)%>
<%if len(rsnews("title"))>30 then%>
...
<%end if%>
</span></a> </div></td>
<%
i=i+1
rsnews.movenext
loop
else
if rsnews.eof and rsnews.bof then
%>
<%end if
end if%>
</tr>
</table>
</div></td>
</tr>
</table> 展开
<tr>
<td height="84" valign="top"><table width="648" height="24" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td width="550" height="24" valign="top">
<div align="center">
<table width="100%" border="0" cellspacing="1" cellpadding="0">
<% dim totalnews,Currentpage,totalpages,i
sqlnews="select * from article where shenghe=1 and typeid="&typeid&" order by dateandtime DESC"
set rsnews=server.createobject("adodb.recordset")
rsnews.open sqlnews,conn,1,1
if rsnews.eof and rsnews.bof then
response.write ("没有任何数据,请期待更新!")
end if%>
<%
if not rsnews.eof then
rsnews.movefirst
rsnews.pagesize=newsperpage
if trim(request("page"))<>"" then
currentpage=clng(request("page"))
if currentpage>rsnews.pagecount then
currentpage=rsnews.pagecount
end if
else
currentpage=1
end if
totalnews=rsnews.recordcount
if currentpage<>1 then
if (currentpage-1)*newsperpage<totalnews then
rsnews.move(currentpage-1)*newsperpage
dim bookmark
bookmark=rsnews.bookmark
end if
end if
if (totalnews mod newsperpage)=0 then
totalpages=totalnews\newsperpage
else
totalpages=totalnews\newsperpage+1
end if
i=0
do while not rsnews.eof and i<newsperpage
%>
<tr>
<td height="26" class="style46"> <div align="left" class="style8">· <a href="show.asp?typeid=<%=rsnews("typeid")%>&id=<%=rsnews("newsid")%>" target="_blank" class="style8">
<%=left(rsnews("title"),30)%>
<%if len(rsnews("title"))>30 then%>
...
<%end if%>
</span></a> </div></td>
<%
i=i+1
rsnews.movenext
loop
else
if rsnews.eof and rsnews.bof then
%>
<%end if
end if%>
</tr>
</table>
</div></td>
</tr>
</table> 展开
1个回答
展开全部
<%= rsnews("dateandtime") %>
把这个加到你想显示的更新时间的地方
建议你可以加到
<%=left(rsnews("title"),30)%>
<%if len(rsnews("title"))>30 then%>
...
<%end if%>
</span></a>
的后面,
也就是
<%=left(rsnews("title"),30)%>
<%if len(rsnews("title"))>30 then%>
...
<%end if%>
</span></a>
<%= rsnews("dateandtime") %>
</div></td>
把这个加到你想显示的更新时间的地方
建议你可以加到
<%=left(rsnews("title"),30)%>
<%if len(rsnews("title"))>30 then%>
...
<%end if%>
</span></a>
的后面,
也就是
<%=left(rsnews("title"),30)%>
<%if len(rsnews("title"))>30 then%>
...
<%end if%>
</span></a>
<%= rsnews("dateandtime") %>
</div></td>
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询