求一个asp网页公告栏代码
解决时间 2021-04-26 19:14
- 提问者网友:沦陷
- 2021-04-26 05:58
上下滚动代码,读取后台TEXT文本内容的
asp代码
最佳答案
- 五星知识达人网友:冷風如刀
- 2021-04-26 06:58
<table width="220" border="0" cellspacing="0" cellpadding="0" class="b">
<tr>
<td width="220" height="13" align="left" valign="top"> </td>
</tr>
<tr>
<td height="375" align="left" valign="top" class="bkcss"><div id=demo style=overflow:hidden;height:470px;>
<div id=demo1>
<TABLE width=100% border="0" align=center cellPadding=0 cellSpacing=0 id=news>
<%
SQL = "select username,sex,(year(getdate())-year(birthday))as time1, area ,edu,love,height_,aboutus from love_main"
Set Rs = Conn.Execute(SQL)
While Not Rs.Eof
username = Left(Rs(0),8)
sex =Rs(1)
time1 =(Rs(2))
area =Rs(3)
edu=Rs(4)
love=Rs(5)
height_=Rs(6)
aboutus=Rs(7)
%>
<TR bordercolor="#0033FF">
<TD width="65" vAlign=top ><A href=" http://www.jiaoyou180.com/display.aspx?username=<%= username %>" target=_blank><%= username %></A></TD>
<TD width="412" align="left" vAlign=center ><div align="left" class="STYLE13"><%= sex %> <%= time1 %> <%= area %> <%= edu %> <%= love%> <%=height_%>cm <%=aboutus%></div></TD>
</TR>
<%
Rs.Movenext
Wend
Rs.Close
%>
</TABLE>
</div>
<div id=demo2></div>
</div></td>
<script>
<!--
var speed = 15;//滚动速度
var rows = 22;//每行高度
var stim = 80; //停留时间倍数 * speed
var stop = 0; //初始化值,不管
demo2.innerHTML = demo1.innerHTML
function Marquee(){
if(demo.scrollTop%rows==0 && stop<=stim){
stop++;
return;
}
stop = 0;
if(demo2.offsetTop-demo.scrollTop<=0)
demo.scrollTop-=demo1.offsetHeight
else{
demo.scrollTop++
}
}
var MyMar = setInterval(Marquee,speed)
demo.onmouseover = function() {clearInterval(MyMar)}
demo.onmouseout = function() {MyMar=setInterval(Marquee,speed)}
-->
</script>
</tr>
</table>
我要举报
大家都在看
推荐资讯