| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 655 人关注过本帖
标题:帮忙修改ASP源码
只看楼主 加入收藏
zpfycms
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2012-7-29
结帖率:60%
收藏
已结贴  问题点数:20 回复次数:4 
帮忙修改ASP源码
这是一段asp公告通知栏的源码,我想跪求高手帮忙改一下,使这个公告通知栏改为:1、不滚动显示,2、最新发布的内容显示在最前面,3、增加发布内容的显示日期和时间。另外,我的数据库里的时间字段名是:dateandtime。谢谢!!!


<table width="232" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="568" align="center" valign="top">
<div class="right_border">
<table width="220" height="117" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="53" height="26" align="center" background="images/echsys_index_24.gif"><img src="Images/t_d.gif" width="12" height="11" /></td>
<td width="83" height="26" background="images/echsys_index_24.gif" class="white_title">公告通知</td>
<td width="84" align="right" background="images/echsys_index_24.gif" class="white_title"><a href="E_board.asp" target="_blank"><img src="Images/more_bai.gif" width="60" height="20" border="0" /></a></td>
</tr>
<tr>
<td colspan="3" align="center" bgcolor="#FFFFFF">
<div id="demoa" style="OVERFLOW: hidden; WIDTH: 190px; HEIGHT: 170px">
<div id="demoa1">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
Set Rsb=Conn.Execute("select top 10 * from "& db_EC_Board_Table)
if Rsb.Bof and Rsb.Eof then
Response.Write "<tr><td align=center>暂无公告</td></tr>"
Else
Do While Not Rsb.Eof
%>
<tr>
<td height="18" align="left" class="blacklink"><div class="side_con"> ·<a href="E_Board_News.asp?ID=<%=rsb("ID")%>" class="middle" target="_blank"> <%=CutStr(htmlencode4(Rsb("title")),24)%></a></div></td>
</tr>
<%
Rsb.Movenext
Loop
End If
Rsb.Close
Set Rsb=Nothing
%>
</table>
</div>
<div id="demoa2"></div>
</div>
<script>
var speed2=60
demoa2.innerHTML=demoa1.innerHTML
function Marquee2(){
if(demoa2.offsetTop-demoa.scrollTop<=0)
demoa.scrollTop-=demoa1.offsetHeight
else{
demoa.scrollTop++
}
}
var MyMar2=setInterval(Marquee2,speed2)
demoa.onmouseover=function() {clearInterval(MyMar2)}
demoa.onmouseout=function() {MyMar2=setInterval(Marquee2,speed2)}
</script> </td>
</tr>
</table>
</div>

<div class="right_border">
 </div>
<div class="right_border">
 </div>
<div class="right_border">
 </div>
<div class="right_border">
 </div>
</td>
</tr>
</table>
搜索更多相关主题的帖子: center border ASP源码 通知 
2012-07-29 17:45
xmlz
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
威 望:5
帖 子:294
专家分:1392
注 册:2010-8-29
收藏
得分:10 
试试:

<table width="232" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td height="568" align="center" valign="top">
<div class="right_border">
<table width="220" height="117" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
<tr>
<td width="53" height="26" align="center" background="images/echsys_index_24.gif"><img src="Images/t_d.gif" width="12" height="11" /></td>
<td width="83" height="26" background="images/echsys_index_24.gif" class="white_title">公告通知</td>
<td width="84" align="right" background="images/echsys_index_24.gif" class="white_title"><a href="E_board.asp" target="_blank"><img src="Images/more_bai.gif" width="60" height="20" border="0" /></a></td>
</tr>
<tr>
<td colspan="3" align="center" bgcolor="#FFFFFF">
<div id="demoa" style="OVERFLOW: hidden; WIDTH: 190px; HEIGHT: 170px">
<div id="demoa1">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
<%
Set Rsb=Conn.Execute("select top 10 * from "& db_EC_Board_Table&" order by dateandtime")
if Rsb.Bof and Rsb.Eof then
Response.Write "<tr><td align=center>暂无公告</td></tr>"
Else
Do While Not Rsb.Eof
%>
<tr>
<td height="18" align="left" class="blacklink"><div class="side_con"> ·<a href="E_Board_News.asp?ID=<%=rsb("ID")%>" class="middle" target="_blank"> <%=CutStr(htmlencode4(Rsb("title")),24)%><%=rsb("dateandtime")%></a></div></td>
</tr>
<%
Rsb.Movenext
Loop
End If
Rsb.Close
Set Rsb=Nothing
%>
</table>
</div>
<div id="demoa2"></div>
</div>
 </td>
</tr>
</table>
</div>

<div class="right_border">
 </div>
<div class="right_border">
 </div>
<div class="right_border">
 </div>
<div class="right_border">
 </div>
</td>
</tr>
</table>
2012-07-30 09:49
ysf0181
Rank: 16Rank: 16Rank: 16Rank: 16
等 级:版主
威 望:55
帖 子:914
专家分:2385
注 册:2006-10-4
收藏
得分:10 
这个都不知道啊。拿本书多看下。

Set Rsb=Conn.Execute("select top 10 * from "& db_EC_Board_Table &"order by dateandtime desc")
if Rsb.Bof and Rsb.Eof then
Response.Write "<tr><td align=center>暂无公告</td></tr>"
Else

ASP讨论QQ群:251346273
2012-07-30 11:13
xmlz
Rank: 9Rank: 9Rank: 9
等 级:蜘蛛侠
威 望:5
帖 子:294
专家分:1392
注 册:2010-8-29
收藏
得分:0 
额,我忘了降序
2012-07-30 16:48
zpfycms
Rank: 1
等 级:新手上路
帖 子:13
专家分:0
注 册:2012-7-29
收藏
得分:0 
谢谢楼上两位好心人,祝你健康  开心 快乐。
2012-07-30 19:20
快速回复:帮忙修改ASP源码
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.029524 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved