文字向左移动[asp]
脚本说明:把如下代码加入<body>区域中:
<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="http://www.javascript2000.com">网页制作特效</a> javascript的精彩世界 </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>
<ilayer width=&{marqueewidth}; height=&{marqueeheight}; name="cmarquee01">
<layer name="cmarquee02"></layer>
</ilayer> 其实。。。。
我发的贴满好玩的。。。。为什么大家都不支持一下。。。
直接打开DW。新建一个ASP文档,然后复制在代码那里,就搞掂了。。。
满好玩的。。。
支持一下吧!!! translate发了这么多好东西,当然要顶的啦 你发的都属于JavaScript的,他不属于asp 支持你! ^_^。。。。。。。 支持!!:cool: 我都好久没有在这个论坛玩了!游戏去了!哈哈! 我看到啊。。。。
好久没看到你的贴了。。。。 我太爱玩了!现在很少上了!你天天上哦~!哈哈!加油! 没有啦。。。在这里很好玩。。。。 你跟我刚刚来的时候一样的心情!
我也是这样想的!久而久之就不是了! 我看到里面写的汉字,又有字母,就不知道哪才是代码了,是下面的都是,还有汉字不是,只是说明? //这样的双斜线后面的都是说明文字! ding 哪用这么复杂的呀?
在你想滚动的文字前面加上
<MARQUEE onmouseover=this.stop() onmouseout=this.start()
scrollAmount=2 scrollDelay=4 align="left">
就可以了,,,,
鼠标停留在文字上还可以停止滚动。。。 謝謝樓主..
页:
[1]
