發新話題
打印

波浪型字句顯示

波浪型字句顯示

font-family:細明體;color:#FF00FF;font-size:15pt  <<< 字型、顏色、字體大小全部可改

句子越長,效果越佳


如不能顯示語法效果可貼去本站語法測試板試看




<script language="JavaScript">
<!--
<!--文字內容-->
message="笨笨網站超級論壇   http://www.bunbunhk.com/BBS/Discuz/index.php"
ns6switch=1
var ns6=document.getElementById&&!document.all
mes=new Array();
mes[0]=-2;
mes[1]=-5;
mes[2]=-8;
mes[3]=-11;
mes[4]=-14;
mes[5]=-11;
mes[6]=-8;
mes[7]=-5;
mes[8]=-2;
num=0;
num2=0;
txt="";
function jump0(){
if (ns6&&!ns6switch){
jump.innerHTML=message
return
}
if(message.length > 6){
for(i=0; i != message.length;i++){
txt=txt+"<span style='position:relative;' id='n"+i+"'>"+message.charAt(i)+"</span>"};
jump.innerHTML=txt;
txt="";
jump1a()
}
else{
alert("您輸入的文字太少 !")
}
}
function jump1a(){
nfinal=(document.getElementById)? document.getElementById("n0") : document.all.n0
nfinal.style.left=-num2;
if(num2 != 9){
num2=num2+3;
setTimeout("jump1a()",50)
}
else{
jump1b()
}
}
function jump1b(){
nfinal.style.left=-num2;
if(num2 != 0){num2=num2-3;
setTimeout("jump1b()",50)
}
else{
jump2()
}
}
function jump2(){
txt="";
for(i=0;i != message.length;i++){
if(i+num > -1 && i+num < 70){
txt=txt+"<span style='position:relative;top:"+mes[i+num]+"'>"+message.charAt(i)+"</span>"
}
else{txt=txt+"<span>"+message.charAt(i)+"</span>"}
}
jump.innerHTML=txt;
txt="";
if(num != (-message.length)){
num--;
setTimeout("jump2()",50)}
else{num=0;
setTimeout("jump0()",50)}}
-->
</script>
<div id="jumpx" align="center" style="font-family:細明體;color:#FF00FF;font-size:15pt"></div>
<script language="JavaScript">
<!--
if (document.all||document.getElementById){
jump=(document.getElementById)? document.getElementById("jumpx") : document.all.jumpx
jump0()
}
else
document.write(message)
-->
</script>


我唔係人.........

TOP

複製上列語法



我唔係人.........

TOP