close

文字特效-打字效果

語法:

<script language="JavaScript1.2">       
<!--       
//Secify scroller contents       
var line=new Array()       
line[1]="歡迎光臨「BOBRANIE」^.^ ~..."       
line[2]="本站內容包含了生活小常識...."       
line[3]="星座分析、芒果酪梨栽培與管理."      
line[4]="泡湯介紹、文摘欣賞........."      
line[5]="台灣景點介紹、網站評鑑......"       
line[6]="玉井風光史蹟介紹、網頁素材.."       
line[7]="統一發票對獎、旅遊札記......."       
line[8]="以上全部亂虎爛.我才剛創建的說"       
       
//Specify font size for scoller       
var ts_fontsize="10pt"       
       
//--Don't edit below this line       
       
var longestmessage=1       
for (i=2;i<line.length;i++){       
if (line[i].length>line[longestmessage].length)       
longestmessage=i       
}       
       
//Auto set scroller width       
var tscroller_width=line[longestmessage].length       
       
lines=line.length-1 //--Number of lines       
       
//if IE 4+ or NS6       
if (document.all||document.getElementById){       
document.write('<center> <form name="bannerform">')       
document.write('<input type="text" name="banner" size="'+tscroller_width+'"')       
document.write('  style="background-color: '+document.bgColor+'; color: '+document.body.text+'; font-family: verdana; font-size: '+ts_fontsize+'; font-weight:bold; border: medium none" onfocus="blur()">')       
document.write('</form>')       
}       
       
temp=""       
nextchar=-1;       
nextline=1;       
cursor="\\"       
function animate(){       
if (temp==line[nextline] & temp.length==line[nextline].length & nextline!=lines){       
nextline++;       
nextchar=-1;       
document.bannerform.banner.value=temp;       
temp="";       
setTimeout("nextstep()",800)}       
else if (nextline==lines & temp==line[nextline] & temp.length==line[nextline].length){       
nextline=1;       
nextchar=-1;       
document.bannerform.banner.value=temp;       
temp="";       
setTimeout("nextstep()",800)}       
else{       
nextstep()}}       
       
function nextstep(){       
       
if (cursor=="\\"){       
cursor="|"}       
else if (cursor=="|"){       
cursor="/"}       
else if (cursor=="/"){       
cursor="-"}       
else if (cursor=="-"){       
cursor="\\"}       
       
       
nextchar++;       
temp+=line[nextline].charAt(nextchar);       
document.bannerform.banner.value=temp+cursor       
setTimeout("animate()",80)}       
       
//if IE 4+ or NS6       
if (document.all||document.getElementById)       
window.onload=animate       
// -->       
</script>




以上只要再變動公告內容,
複製到 部落格管理-->面板設定-->新增自定欄位   貼上即可!


               


                                                                           歡迎光臨阿盛網站~

arrow
arrow
    全站熱搜

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