[Codes] Chữ chạy theo con trỏ chuột?10/22/2013, 12:04 pm
Khách viếng thăm
[code]<!-- [color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var text='Foget Me Not Teen9b - Teen9B No1!';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var delay = 40; // SPEED OF TRAIL[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var Xoff = 0; // PIXEL COUNT FROM THE LEFT OF THE CURSOR (- VALUES GO TO LEFT)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var Yoff = -30; // PIXEL COUNT FROM THE TOP OF THE CURSOR (- VALUES GO UP)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var txtw = 14; // AMOUNT OF PIXEL SPACE EACH CHARACTER OCCUPIES[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var beghtml = '<font color="#FF0000"><b>'; // OPTIONAL HTML CODE THAT EFFECTS WHOLE TEXT STRING SUCH AS FONT COLOR, SIZE, ETC.[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var endhtml = '<\/b><\/font>'; // END HTML CODE. MOSTLY USED IF ABOVE SETTING IS USED.[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ns4 = (navigator.appName.indexOf("Netscape")>=0 && document.layers)? true : false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ie4 = (document.all && !document.getElementById)? true : false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ie5 = (document.all && document.getElementById)? true : false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var txtA = new Array();[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
text=text.split('');[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var x1=0;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var y1=-1000;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var t='';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
for(i=1; i <= text.length; i++) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
t+=(ns4)? '<layer name="txt'+i+'" top="-100" left="0" width="'+txtw+'" height="1">' : '<div id="txt'+i+'" style="position:absolute; top:-100px; left:0px; height:1px; width:'+txtw+'; visibility:visible;">';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
t+=beghtml+text[i-1]+endhtml;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
t+=(ns4)? '<\/layer>' : '<\/div>';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
document.write(t);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function moveid(id,x,y) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
id.moveTo(x,y);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}else{[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
id.style.left=x+'px';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
id.style.top=y+'px';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function animate(evt) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
x1=Xoff+((ie4||ie5)?event.clientX+document.body.scrollLeft:evt.pageX);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
y1=Yoff+((ie4||ie5)?event.clientY+document.body.scrollTop:evt.pageY);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function getidleft(id) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return id.left;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return parseInt(id.style.left);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function getidtop(id) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return id.top;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return parseInt(id.style.top);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function getwindowwidth() {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ie4||ie5)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return document.body.clientWidth+document.body.scrollLeft;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return window.innerWidth+pageXOffset;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function movetxts() {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
for(i=text.length;i>1;i=i-1) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(getidleft(txtA[i-1])+txtw*2>=getwindowwidth()) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[i-1],0,-1000);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[i],0,-1000);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[i], getidleft(txtA[i-1])+txtw, getidtop(txtA[i-1]));[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[1],x1,y1);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
window.onload=function() {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
for(i=1;i<=text.length;i++)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
txtA[i]=(ns4)?document.layers['txt'+i]:(ie4)?document.all['txt'+i]:document.getElementById('txt'+i);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
document.captureEvents(Event.MOUSEMOVE);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
document.onmousemove=animate;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
setInterval('movetxts()',delay);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
-->[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
</script>[/code]cho vào HTML nhá
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var text='Foget Me Not Teen9b - Teen9B No1!';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var delay = 40; // SPEED OF TRAIL[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var Xoff = 0; // PIXEL COUNT FROM THE LEFT OF THE CURSOR (- VALUES GO TO LEFT)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var Yoff = -30; // PIXEL COUNT FROM THE TOP OF THE CURSOR (- VALUES GO UP)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var txtw = 14; // AMOUNT OF PIXEL SPACE EACH CHARACTER OCCUPIES[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var beghtml = '<font color="#FF0000"><b>'; // OPTIONAL HTML CODE THAT EFFECTS WHOLE TEXT STRING SUCH AS FONT COLOR, SIZE, ETC.[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var endhtml = '<\/b><\/font>'; // END HTML CODE. MOSTLY USED IF ABOVE SETTING IS USED.[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ns4 = (navigator.appName.indexOf("Netscape")>=0 && document.layers)? true : false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ie4 = (document.all && !document.getElementById)? true : false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ie5 = (document.all && document.getElementById)? true : false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
ns6 = (document.getElementById && navigator.appName.indexOf("Netscape")>=0 )? true: false;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var txtA = new Array();[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
text=text.split('');[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var x1=0;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var y1=-1000;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
var t='';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
for(i=1; i <= text.length; i++) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
t+=(ns4)? '<layer name="txt'+i+'" top="-100" left="0" width="'+txtw+'" height="1">' : '<div id="txt'+i+'" style="position:absolute; top:-100px; left:0px; height:1px; width:'+txtw+'; visibility:visible;">';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
t+=beghtml+text[i-1]+endhtml;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
t+=(ns4)? '<\/layer>' : '<\/div>';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
document.write(t);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function moveid(id,x,y) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
id.moveTo(x,y);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}else{[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
id.style.left=x+'px';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
id.style.top=y+'px';[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function animate(evt) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
x1=Xoff+((ie4||ie5)?event.clientX+document.body.scrollLeft:evt.pageX);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
y1=Yoff+((ie4||ie5)?event.clientY+document.body.scrollTop:evt.pageY);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function getidleft(id) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return id.left;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return parseInt(id.style.left);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function getidtop(id) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return id.top;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return parseInt(id.style.top);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function getwindowwidth() {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ie4||ie5)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return document.body.clientWidth+document.body.scrollLeft;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
return window.innerWidth+pageXOffset;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
function movetxts() {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
for(i=text.length;i>1;i=i-1) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(getidleft(txtA[i-1])+txtw*2>=getwindowwidth()) {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[i-1],0,-1000);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[i],0,-1000);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}else[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[i], getidleft(txtA[i-1])+txtw, getidtop(txtA[i-1]));[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
moveid(txtA[1],x1,y1);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
window.onload=function() {[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
for(i=1;i<=text.length;i++)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
txtA[i]=(ns4)?document.layers['txt'+i]:(ie4)?document.all['txt'+i]:document.getElementById('txt'+i);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
if(ns4)[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
document.captureEvents(Event.MOUSEMOVE);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
document.onmousemove=animate;[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
setInterval('movetxts()',delay);[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
}[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
-->[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
[color=#006600][font=Courier, 'Courier New', sans-serif][/font][/color]
</script>[/code]cho vào HTML nhá