board.asp

来自「庐江二中」· ASP 代码 · 共 57 行

ASP
57
字号
<%
boardcontent=""
sql="select Content,DateAndTime from announce where board=1 and ischecked=1"
rs.open sql,conn,1,1
do while not rs.eof
boardcontent=boardcontent&rs(0)&"&nbsp;("&rs(1)&")  "
rs.movenext
loop
rs.close
%>
<table width="98%" height="22" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="18">&nbsp;</td>
    <td height="18"> <script language="JavaScript1.2">
//设置marquee的宽度 (in pixels)
var marqueewidth=400
//设置marquee的高度 (in pixels, 该参数只适用于NS)
var marqueeheight=22
//设置marquee滚动的速度(数值大速度快)
var speed=4
//设置marquee显示内容,使用标准的HTML语法。
var marqueecontents='<%=boardcontent%> '
if (document.all)
document.write('<marquee scrollAmount='+speed+' style="width:'+marqueewidth+'">'+marqueecontents+'</marquee>')
function regenerate(){
window.location.reload()
}
function regenerate2(){
if (document.layers){
setTimeout("window.onresize=regenerate",450)
intializemarquee()
}
}
function intializemarquee(){
document.cmarquee01.document.cmarquee02.document.write('<nobr>'+marqueecontents+'</nobr>')
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.width
scrollit()
}
function scrollit(){
if (document.cmarquee01.document.cmarquee02.left>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.left-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.left=marqueewidth
scrollit()
}
}
window.onload=regenerate2
</script> <ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01"> 
      <layer name="cmarquee02"></layer>
      </ilayer></td>
    <td width="21">&nbsp;</td>
  </tr>
</table>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?