welcome sinh k7
Bạn có muốn phản ứng với tin nhắn này? Vui lòng đăng ký diễn đàn trong một vài cú nhấp chuột hoặc đăng nhập để tiếp tục.



 
Trang ChínhCode Con trỏ hiển thị chữ  EmptyGalleryTìm kiếmLatest imagesĐăng kýĐăng Nhập

 

 Code Con trỏ hiển thị chữ

Go down 
Tác giảThông điệp
vip_boy_lalo
Admin
Admin
vip_boy_lalo


Tổng số bài gửi : 73
Points : 243
Reputation : 0
Join date : 08/06/2010
Age : 37
Đến từ : Hà Quảng - Cao Bằng

Code Con trỏ hiển thị chữ  Empty
Bài gửiTiêu đề: Code Con trỏ hiển thị chữ    Code Con trỏ hiển thị chữ  I_icon_minitimeSat 11 Dec 2010, 6:19 pm

Code:
<html>
<head>

<STYLE>
.spanstyle {
    position:absolute;
    visibility:visible;
    top:-50px;
    font-size:10pt;
    font-family:Verdana;
font-weight:bold;
    color:black;
}
</STYLE>

<script>

/*
Cursor Trailor Text- By Peter Gehrig (http://www.24fun.ch/)
Permission given to Dynamicdrive.com to feature script in it's archive.
For full source code, installation instructions, and 1000's more DHTML scripts,
visit http://dynamicdrive.com
*/

var x,y
var step=20
var flag=0

// Your snappy message. Important: the space at the end of the sentence!!!
var message="DYNAMIC DRIVE! "
message=message.split("")

var xpos=new Array()
for (i=0;i<=message.length-1;i++) {
    xpos[i]=-50
}

var ypos=new Array()
for (i=0;i<=message.length-1;i++) {
    ypos[i]=-50
}

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)
}

</script>

</head>
<body onLoad="makesnake()" style="width:100%;overflow-x:hidden;overflow-y:scroll">

<script>
<!-- Beginning of JavaScript -

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;

// - End of JavaScript - -->
</script>

</body>
</html>
Về Đầu Trang Go down
http://www.pacbovippro.tk
 
Code Con trỏ hiển thị chữ
Về Đầu Trang 
Trang 1 trong tổng số 1 trang
 Similar topics
-
» Code khi tắt web thì hiện thông báo
» Code danh sách các thành viên (re chuột hiện thị ảnh)
» Code tra cứu sự kiện “ Ngày này năm xưa”
» code trang chủ dep
» code quảng cáo hai bên

Permissions in this forum:Bạn không có quyền trả lời bài viết
welcome sinh k7  :: Giải trí :: chuyên mục :: chia sẻ code-
Chuyển đến