語法展示::   http://home.graffiti.net/oopltgh/


請用IE6.0或更新版本觀看語法特效展示


將以下程式碼複製,貼在<body>及</body>標籤之間。

<script language=JavaScript>
<!--
msg ="歡迎光臨紫蓮的部落格!
";
align="center";
speed=500;
up=true;
spas=" ";
for (a=0;a<=9;a++) {spas+=" "}
msg=spas+msg+spas;
j=eval(-1);
stop=msg.length;
document.write("<form name='form'><table border=0 cellspacing=0 "
+"cellpadding=0 align="+align+">");
for (i=1;i<=10;i++) {
document.write("<tr><td><input type=text name=\"box"+i+"\" size=1>");
document.write("</td></tr>");
}
document.write("</table></form>");
function scrollIt() {
j++;
with (document.form) {
if ((j+9) <= stop) {
box1.value = msg.charAt(j);
box2.value = msg.charAt(j+1);
box3.value = msg.charAt(j+2);
box4.value = msg.charAt(j+3);
box5.value = msg.charAt(j+4);
box6.value = msg.charAt(j+5);
box7.value = msg.charAt(j+6);
box8.value = msg.charAt(j+7);
box9.value = msg.charAt(j+8);
box10.value = msg.charAt(j+9);
} else {
j=0;
   }
}
setTimeout("scrollIt()",speed); 
}
scrollIt();
-->
</script>

msg ="歡迎光臨紫蓮的部落格!";中修改跑馬燈的文字內容

speed=500; 中修改跑馬燈的速度

arrow
arrow
    全站熱搜

    eeredqq 發表在 痞客邦 留言(0) 人氣()