昆山人才市场司机:请问网页里面的滚动的公告栏具体怎么做呢?

来源:百度文库 编辑:杭州交通信息网 时间:2024/05/01 11:59:35

<html>
<head>
<title> New Document </title>
<style>
A.News
{
FONT-SIZE:12px;
TEXT-decoration : none;
COLOR:#003366;
}
A.News:active
{
FONT-SIZE:12px;
TEXT-decoration : underline;
COLOR:#003366;
}
A.News:link
{
FONT-SIZE:12px;
TEXT-decoration : none;
COLOR:#003366;
}
A.News:visited
{
FONT-SIZE:12px;
TEXT-decoration : none;
COLOR:#003366;
}
A.News:hover
{
FONT-SIZE:12px;
TEXT-decoration : underline;
COLOR:#990000;
}
</style>
</head>

<body>
<MARQUEE onmouseover=this.stop() onmouseout=this.start()
scrollAmount=1 file://这里设置滚动速度,将1改成其它数看看
scrollDelay=4 direction=up
width=168 height=110 file://设置滚动区域的宽高
style="line-height: 150%; "><a href="http://www.baidu.com" class="News">www.baidu.com</a><br>
<a href="#" class="News">E网资源站</a><br>
<a href="#" class="News">教程特效</a><br>
<a href="#" class="News">电影音乐</a></MARQUEE>

</body>
</html>

<body><font size="2" color="#3333FF"><script language=JavaScript1.2>

var marqueewidth=135
var marqueeheight=170
var speed=1

var marqueecontents='<span style="font-size:12px;line-height:14pt;color: #AA0000">'+'你的公告文字<br>'+'<br>'+'你的公告文字<br>'+'<br>'+'你的公告文字<br>'+'<br>'+'你的公告文字<br>'+'</span>'

if (document.all)
document.write('<marquee direction="up" scrollAmount='+speed+' style="width:'+marqueewidth+';height:'+marqueeheight+'">'+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(marqueecontents)
document.cmarquee01.document.cmarquee02.document.close()
thelength=document.cmarquee01.document.cmarquee02.document.height
scrollit()
}

function scrollit(){
if (document.cmarquee01.document.cmarquee02.top>=thelength*(-1)){
document.cmarquee01.document.cmarquee02.top-=speed
setTimeout("scrollit()",100)
}
else{
document.cmarquee01.document.cmarquee02.top=marqueeheight
scrollit()
}
}

window.onload=regenerate2
</script>
</font> <font size="2" color="#3333FF">
<ilayer width="&{marqueewidth};" name="cmarquee01"
height="&{marqueeheight};"> </ilayer></font></body>

--------------------------------------------------------------
希望交个朋友,加我QQ:438178597 (注明:交友)
我有一个网站,一个全心全意为大众做贡献的网站,希望你能来。
最近我们还举行了一个回报会员的活动,发贴就送8位QQ号,希望你能参加

用<MARQUEE >和脚本都能实现,但是用<MARQUEE >会出现间断不连续,根据自己要求选择用楼上的就行了,:)