»
EnglishFrenchVietnamese

Print - Cursor Trailer Text 2 - JavaScriptBank.com

Full version: jsB@nk » Pointer » Trailer » Cursor Trailer Text 2
URL: https://www.javascriptbank.com/cursor-trailer-text-2.html

Cursor Trailer Text 2 © JavaScriptBank.comIt used to be that a mouse cursor was just a mouse cursor. Since DHTML came along and gave programmers the ability to track the precise coordinates of the mouse, it was only a matter of time that cursor effects started showing up.

Full version: jsB@nk » Pointer » Trailer » Cursor Trailer Text 2
URL: https://www.javascriptbank.com/cursor-trailer-text-2.html



CSS
<STYLE>.spanstyle {FONT-SIZE: 31pt; VISIBILITY: visible; COLOR: #000000; FONT-FAMILY: Vantage; POSITION: absolute; TOP: -30px}</STYLE><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


JavaScript
<SCRIPT>  <!--//  var x, y  var step = 12  var flag = 0  var message = "W e l co m e  t o  J S B a n k !"  message = message.split("")  var xpos = new Array()  for (i = 0; i <= message.length - 1; i++) {xpos[i] = -30}  var ypos = new Array()  for (i = 0; i <= message.length - 1; i++) {ypos[i] = -30}  function handlerMM(e){   x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX   y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY   flag = 1  } function makesnake() {  if (flag == 1 && document.all) {   for (i = message.length - 1; i >= 1; i--) {    xpos[i] = xpos[i - 1] + step    ypos[i] = ypos[i - 1]   }   xpos[0] = x + step   ypos[0] = y   for (i = 0; i < message.length - 1; i++) {    var thisspan = eval("span" + (i) + ".style")    thisspan.posLeft = xpos[i]    thisspan.posTop = ypos[i]   }  }  else if (flag == 1 && document.layers) {   for (i = message.length - 1; i >= 1; i--) {    xpos[i] = xpos[i - 1] + step    ypos[i] = ypos[i - 1]   }   xpos[0] = x + step   ypos[0] = y   for (i = 0; i < message.length - 1; i++) {    var thisspan = eval("document.span" + i)    thisspan.left = xpos[i]    thisspan.top = ypos[i]   }  }  var timer = setTimeout("makesnake()",30) }  function setCookie(name, value, expire) {   document.cookie = name + "=" + escape(value) + ((expire == null) ? "" : ("; expires=" + expire.toGMTString()))  }  function setSoundOption(option) {   var today = new Date()   var expires = new Date()   expires.setTime(today.getTime() + 1000*60*60*24*365)   setCookie("SoundOption", option, expires)  }  //--> </SCRIPT><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->


HTML
<BODY onload=makesnake()><A name=top></A><SCRIPT language=JavaScript> <!--// if (top.frames.length != 0) {top.location = document.location} for (i = 0; i <= message.length - 1; i++) {  document.write("<span id='span" + i+ "' class='spanstyle'>")  document.write(message[i])  document.write("</span>") } if (document.layers) {document.captureEvents(Event.MOUSEMOVE)} document.onmousemove = handlerMM; // --></SCRIPT><SCRIPT language=JavaScript>   <!--//    displayTime()    if (!minMSIE4) document.write(makeTime())   //-->  </SCRIPT></body><!--    This script downloaded from www.JavaScriptBank.com    Come to view and download over 2000+ free javascript at www.JavaScriptBank.com-->