Script chào mừng qua hiệu ứng chữ nhảy ra màn hình
Thứ Bảy, 17 tháng 7, 2010
Hiệu ứng khá ấn tượng.
<script type='text/javascript'>
m1="Welcome to tpm1512.blogspot.com "; // Nho de dau cach (space) vao tu cuoi cung
m2="Thank for your visited ";
m3="Chào mừng bạn đến tpm1512.blogspot.com ";
m4="Cảm ơn bạn đã ghé thăm ";
message=m1+m2+m3+m4;
colours=new Array('fff000','00ff00')//Pick your colours, any amount.
siZe=26;//Explorer only! can be outrageous size.
message=message.split(' ');
timer=null;
clrPos=0;
msgPos=0;
jog=1;
currentStep=10;
step=8;
ns=(document.layers)?1:0;
viz=(document.layers)?'hide':'hidden';
if (ns)
document.write("<div id='T' style='position:absolute'></div><br>");
else{
document.write("<div style='position:absolute'>");
document.write("<div align='center' style='position:relative'>");
document.write("<div id='T' style='position:absolute;width:0;height:0;font-family:Arial;font-size:0'>kurt</div>");
document.write("</div></div><br>");
}
function Message(){
var pageHeight=(document.layers)?window.innerHeight:window.document.body.offsetHeight;
var pageWidth=(document.layers)?window.innerWidth:window.document.body.offsetWidth;
if (ns){
ypos=pageHeight/2;
var Write='<div align="center" style="width:0px;height:0px;font-family:Arial,Verdana;font-size:'+currentStep/4+'px;color:'+colours[clrPos]+'">'+message[msgPos]+'</div>';
document.T.top=ypos + -currentStep/8 +window.pageYOffset;
document.T.document.write(Write)
document.T.document.close();
}
else{
ypos=pageHeight/2;
xpos=pageWidth/2;
T.style.width=currentStep;
T.style.pixelTop=ypos+ -currentStep/16 +document.body.scrollTop;
T.style.pixelLeft=(xpos-20)+ -currentStep/2;
T.style.fontSize=currentStep/8;
T.innerHTML=message[msgPos];
T.style.color=colours[clrPos];
}
if (ns)step+=5;
else step+=15;
currentStep+=step
if (ns){
if (currentStep > pageWidth) {currentStep=10;step=8;msgPos+=jog;clrPos+=jog}
if (clrPos >= colours.length) clrPos=0;
}
else
{
if (currentStep > pageWidth*siZe) {currentStep=10;step=8;msgPos+=jog;clrPos+=jog}
if (clrPos >= colours.length) clrPos=0;
}
if (msgPos >= message.length)
{
clearTimeout(timer);
if (ns) document.T.visibility=viz;
else T.style.visibility=viz;
}
timer=setTimeout("Message()",10)
}
//-->
</script>
<body onLoad="Message()" bgcolor="#000000">
</body>
m1="Welcome to tpm1512.blogspot.com "; // Nho de dau cach (space) vao tu cuoi cung
m2="Thank for your visited ";
m3="Chào mừng bạn đến tpm1512.blogspot.com ";
m4="Cảm ơn bạn đã ghé thăm ";
message=m1+m2+m3+m4;
colours=new Array('fff000','00ff00')//Pick your colours, any amount.
siZe=26;//Explorer only! can be outrageous size.
message=message.split(' ');
timer=null;
clrPos=0;
msgPos=0;
jog=1;
currentStep=10;
step=8;
ns=(document.layers)?1:0;
viz=(document.layers)?'hide':'hidden';
if (ns)
document.write("<div id='T' style='position:absolute'></div><br>");
else{
document.write("<div style='position:absolute'>");
document.write("<div align='center' style='position:relative'>");
document.write("<div id='T' style='position:absolute;width:0;height:0;font-family:Arial;font-size:0'>kurt</div>");
document.write("</div></div><br>");
}
function Message(){
var pageHeight=(document.layers)?window.innerHeight:window.document.body.offsetHeight;
var pageWidth=(document.layers)?window.innerWidth:window.document.body.offsetWidth;
if (ns){
ypos=pageHeight/2;
var Write='<div align="center" style="width:0px;height:0px;font-family:Arial,Verdana;font-size:'+currentStep/4+'px;color:'+colours[clrPos]+'">'+message[msgPos]+'</div>';
document.T.top=ypos + -currentStep/8 +window.pageYOffset;
document.T.document.write(Write)
document.T.document.close();
}
else{
ypos=pageHeight/2;
xpos=pageWidth/2;
T.style.width=currentStep;
T.style.pixelTop=ypos+ -currentStep/16 +document.body.scrollTop;
T.style.pixelLeft=(xpos-20)+ -currentStep/2;
T.style.fontSize=currentStep/8;
T.innerHTML=message[msgPos];
T.style.color=colours[clrPos];
}
if (ns)step+=5;
else step+=15;
currentStep+=step
if (ns){
if (currentStep > pageWidth) {currentStep=10;step=8;msgPos+=jog;clrPos+=jog}
if (clrPos >= colours.length) clrPos=0;
}
else
{
if (currentStep > pageWidth*siZe) {currentStep=10;step=8;msgPos+=jog;clrPos+=jog}
if (clrPos >= colours.length) clrPos=0;
}
if (msgPos >= message.length)
{
clearTimeout(timer);
if (ns) document.T.visibility=viz;
else T.style.visibility=viz;
}
timer=setTimeout("Message()",10)
}
//-->
</script>
<body onLoad="Message()" bgcolor="#000000">
</body>
Tăng cỡ chữ
Mặc định
Giảm cỡ chữ
Liên hệ mail: tpm1512@yahoo.com và xem tất cả bài viết trang này
Tại đây
Nhấn vào theo dõi thăm trang web của Trần Phúc Minh
-
https://yogaso1.blogspot.com/2010/07/script-chao-mung-qua-hieu-ung-chu-nhay.html
Minh cám ơn bạn đã quan tâm và rất vui vì bài viết đã đem lại thông tin hữu ích cho bạn.
MENU
Sản phẩm
Trang chủ
Nổi bậc
Tiện ích
Tài khoản
Tác vụ
YOUTUBE
Trang chủ
Lên trên
Tổng số Bình luận [ 0]
Đăng nhận xét