[javascript]代码库
<script language="JavaScript">
//1) 设置显示的内容
var scroller_msg='<font color=#FF00FF>欢迎您光临本站</font>'
//2) 设置多长时间后才显示滚动的内容
var dismissafter=0
var initialvisible=0
if (document.all)
document.write('<marquee id="curscroll" style="position:absolute;width:100px;border:1px solid black;font-size:14px;background-color:#00FFFF;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
document.ondblclick=dismissmessage
if (dismissafter!=0)
setTimeout("dismissmessage()",dismissafter*1000)
}
</script>