Java Script 測試區 Java 分享
, 描述: 在這裡分享您的Java Script
http://lthung.org/index.php?action=test_html#in_center
Sample:
1奧運倒時<div style="right: 10px; position: absolute; top: 20px">
<embed style="overflow:hidden;width:155px;height:37px" src="http://aw.awflasher.com/2008lite.swf" width="155" height="37" type="application/x-shockwave-flash"></embed></div> 2網頁標題 <script language="JavaScript1.2">
<!-- Begin
var message="TVBNOW論壇提供旅者信息及休閑娛樂資料等等…" //specifys the title
var message=message+" " //gives a pause at the end,1 space=1 speed unit, here I used 10 spaces@150 each = 1.5seconds.
i="0" //declares the variable and sets it to start at 0
var temptitle="" //declares the variable and sets it to have no value yet.
var speed="150" //the delay in milliseconds between letters
function titler(){
if (!document.all&&!document.getElementById)
return
document.title=temptitle+message.charAt(i) //sets the initial title
temptitle=temptitle+message.charAt(i) //increases the title by one letter
i++ //increments the counter
if(i==message.length) //determines the end of the message
{
i="0" //resets the counter at the end of the message
temptitle="" //resets the title to a blank value
}
setTimeout("titler()",speed) //Restarts. Remove line for no-repeat.
}
window.onload=titler
// End -->
</script [ 本帖最後由 z0012854 於 2009-3-11 09:57 AM 編輯 ] |
-
2
評分次數
-