將語法插入在</head>之後
----------------------------------------------
<SCRIPT language=JavaScript1.2>
<!--
//1) set message to display
var scroller_msg=' 這個跑馬燈不佔空間又美觀,合乎你的標準唄!'
//2) set whether message should auto disappear after x seconds (0=perpetual).
//Note that double clicking page will also dismiss message
var dismissafter=0
var initialvisible=0
if (document.all)
document.write('<marquee id="curscroll" style="position:absolute;width:120px;border:1px solid #F09C48;font-size:12px;font-face:新細明體;background-color:white;visibility:hidden">'+scroller_msg+'</marquee>')
function followcursor(){
//move cursor function for IE
if (initialvisible==0){
curscroll.style.visibility="visible"
initialvisible=1
}
curscroll.style.left=document.body.scrollLeft+event.clientX+10
curscroll.style.top=document.body.scrollTop+event.clientY+10
}
function dismissmessage(){
curscroll.style.visibility="hidden"
}
if (document.all){
document.onmousemove=followcursor
if (dismissafter!=0)
setTimeout("dismissmessage()",dismissafter*1000)
}
//-->
</SCRIPT>
沒有留言:
張貼留言