日期:2014-05-19  浏览次数:20457 次

如何在消息一栏,用Web控件滚动显示消息?
请问一下,如何用web控件实现消息栏滚动显示消息,并且能够点击某条消息,进入另一画面?
谢谢!~

------解决方案--------------------
&lt;script language=&quot;javascript1.2&quot;&gt;//设置marquee的宽度 (in pixels)var marqueewidth=400//设置marquee的高度 (in pixels, 该参数只适用于NS)var marqueeheight=20 <script language= "javascript1.2 ">
//设置marquee的宽度 (in pixels)
var marqueewidth=400
//设置marquee的高度 (in pixels, 该参数只适用于NS)
var marqueeheight=20
//设置marquee滚动的速度(数值大速度快)
var speed=4
//设置marquee显示内容,使用标准的HTML语法。
var marqueecontents= ' <strong> <big> 欢迎访问 <a href= " <a href=http://bbs.epcboy.com "> EPC工作室 </a> EPC工作室 </a> </a> 欢迎您光临 <a href= "mailto:cm_wylp@sohu.com "> 给我来封信! </a> </big> </strong> </font> '
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>
------解决方案--------------------
HTML自带了Marquee的呀,是一个HTML控件,还用得着搞什么Web控件来实现这种功能?画蛇添足