javascript跟随鼠标的文字带滚动效果 时间:2020-05-12 人气:0 比较简单常用的跟随鼠标文字滚动效果 跟随鼠标的文字带滚动效果 <script language="JavaScript1.2"> var scroller_msg='欢迎进入我的站点' var dismissafter=0 var initialvisible=0 if (document.all) document.write(''+scroller_msg+'') 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> [Ctrl+A 全选 注:如需引入外部Js需刷新才能执行] 加载全部内容