메뉴 건너뛰기

전국분동대여

일반 자료실

컴퓨터/IT 마우스 오버로 하이퍼링크 파편튀게 하기

GACHIMOA 2018.07.23 15:30 조회 수 : 240

마우스 오버로 하이퍼링크 파편튀게 하기

 

<!--1. <BODY></BODY> 부분에 아래의 스크립트를 복사해 넣으세요-->

<script>
                
// 파편의 갯수
var debrisnumber=40
// 파편의 색깔. 더 추가하셔도 됩니다
var debriscolor=new Array("FF0000","AA0000","FF4400","DD2255")
</script>
<script>
var x_debrispos
var y_debrispos
var x,y
var x_random=new Array()
var y_random=new Array()
var max_explsteps=20
var i_explsteps=0
var i_color=0
var pause=10
function startexplosion() {
    i_explsteps=0
    x_debrispos=x
    y_debrispos=y
    for (i=0;i<=debrisnumber;i++) {
        x_random[i]=Math.ceil(40*Math.random())-20
        y_random[i]=Math.ceil(40*Math.random())-20
        }
        if (document.all) {
        for (i=0;i<=debrisnumber;i++) {
            var thisspan=eval("document.all.span"+i+".style")
            thisspan.visibility="VISIBLE"
                        thisspan.posLeft=x_debrispos
                        thisspan.posTop=y_debrispos
                }
        explode_IE()
    }
    if (document.layers) {
        for (i=0;i<=debrisnumber;i++) {
            var thisspan=eval("document.span"+i)
            thisspan.visibility="VISIBLE"
            thisspan.left=x_debrispos
            thisspan.top=y_debrispos
                }
        explode_NN()
    }
}
function explode_IE() {
        if (i_explsteps<=max_explsteps) {
                for (i=0;i<=debrisnumber;i++) {
            var thisspan=eval("document.all.span"+i+".style")
            thisspan.posLeft+=x_random[i]
            thisspan.posTop+=y_random[i]
                }
                i_explsteps++
                var timer=setTimeout("explode_IE()",pause)
        }
        else {
                for (i=0;i<=debrisnumber;i++) {
                var thisspan=eval("document.all.span"+i+".style")
                thisspan.visibility="HIDDEN"
                }
                clearTimeout(timer)
        }
}
function explode_NN() {
        if (i_explsteps<=max_explsteps) {
                for (i=0;i<=debrisnumber;i++) {
            var thisspan=eval("document.span"+i)
            thisspan.left+=x_random[i]
            thisspan.top+=y_random[i]
                }
                i_explsteps++
                var timer=setTimeout("explode_NN()",pause)
        }
        else {
                for (i=0;i<=debrisnumber;i++) {
            var thisspan=eval("document.span"+i)
            thisspan.visibility="HIDDEN"
                }
                clearTimeout(timer)
        }
}
function handlerMM(e){
        x = (document.layers) ? e.pageX : document.body.scrollLeft+event.clientX
        y = (document.layers) ? e.pageY : document.body.scrollTop+event.clientY
}
if (document.layers){
        document.captureEvents(Event.MOUSEMOVE);
}
document.onmousemove = handlerMM;
document.write("<style>")
document.write(".spanstyle {")
document.write("position:absolute;")
document.write("visibility:hidden;")
document.write("}")
document.write("</style>")
for (i=0;i<=debrisnumber;i++) {
    document.write("<div id='span"+i+"' class='spanstyle'>")
    document.write("<table cellpadding=0 cellspacing=0>")
    document.write("<tr><td bgcolor="+debriscolor[i_color]+">")
    document.write("<img src='emptypixel.gif' width=3>")
    document.write("</td></tr></table>")
    document.write("</div>")
    i_color++
    if (i_color>=debriscolor.length) {i_color=0}
}

</script>

<CENTER><a href="#" onMouseOver="startexplosion()" target="_blank">여기에 마우스를 대어 보세요</a></CENTER>

번호 제목 글쓴이
3421 심장 건강에 좋은 습관 8가지 [1] 뉴퐁
3420 잠잘 때 왼쪽으로 자면 생기는 신체 변화 7가지 [2] 뉴퐁
3419 스트레스를 줄이는 놀라운 방법 6가지 [2] 싹쓰리
3418 여성이 팬티에 대해 알아야 할 7가지 [3] 싹쓰리
3417 끓였던 물을 또 끓이면 안 되는 이유 [1] 싹쓰리
3416 "치주염 환자, 코로나 감염 땐 사이토카인 폭풍 가능성 높아" [1] 쌍둥이맘
3415 스마트스토어 상위 노출 꿀팁. 경쟁률 낮은 세부키워드 뽑는 방법 [2] 나혼자번다
3414 열감지 안면인식 출입관리솔루션 400만원짜리를 40만원에(정부지원사업) [1] file 나혼자번다
3413 전자렌지요리 만능 레시피 대공개!! [3] 나혼자번다
3412 식초로 집안을 반짝반짝하게!! 식초 청소법 [4] 쌍둥이맘
3411 마시고 남은 김빠진 맥주 활용법 [2] 쌍둥이맘
3410 계란을 먹은 후 절대 바로 먹으면 안되는 것들 쌍둥이맘
3409 아주 유용한 커피상식 쌍둥이맘
3408 간 건강과 지방간 완화에 아주 효과적인 채소는? [2] 싹쓰리
3407 골다공증 예방과 뼈에 아주 좋은 음식 8가지 싹쓰리
3406 체했을 때, 감기 걸렸을 때, 관절염 통증에는 이것이 최고!! 싹쓰리
3405 장을 편안하게 하면서 소화를 돕는 식품 5가지 [1] 싹쓰리
3404 초보운전자가 반드시 알아야 하는 고속도로 운전매너 5 [1] 싹쓰리
3403 머리카락이나 두피를 상하게 하는 사소한 습관 5 라이믹스
3402 어둡고 칙칙한 피부를 환하게 해주는 필수적인 습관 5 라이믹스
위로