본문 바로가기

javascript

하이퍼링크 텍스트 애니메이션 2탄

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

<script>

<!-- Beginning of JavaScript -

var i_strength=0
var max_strength=6
var shadowcolor="red"
var timer
var speed=50
var thisobj

function gotoURL(){
      var newWindow=window.open("http://www.jasko.co.kr","newwin","status,directories,menubar,scrollbars,titlebar,toolbar,resizable,HEIGHT=600,WIDTH=1000")
      newWindow.focus()
}

function stopfilter(thisdiv){
    if (document.all) {
        clearTimeout(timer)
            thisobj=thisdiv
        thisobj.style.filter=" "
    }
}


function startfilter(thisdiv){
    if (document.all) {
        clearTimeout(timer)
            thisobj=thisdiv
        morefilter()
    }
}

function morefilter(){
    if (i_strength <=max_strength) {
            thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")"
        i_strength++
        timer = setTimeout("morefilter()",speed)
    }
    else {
        clearTimeout(timer)
        lessfilter()
    }
}

function lessfilter(){
    if (i_strength >=0) {
            thisobj.style.filter="glow(color="+shadowcolor+", strength="+i_strength+")"
        i_strength--
        timer = setTimeout("lessfilter()",speed)
    }    
    else {
        clearTimeout(timer)
        morefilter()
    }
}

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

<STYLE TYPE="text/css">
.nav {
    position:absolute;
    left:40px;
    font-family:Times;
    font-size=25pt;
    color:#FFFFFF;
    text-decoration:none
    }
</STYLE>
</HEAD>

<!--2. <BODY> 태그내에 onload="" 혹은 onunload 부분이 있으면 복사해 넣으세요-->

<body bgcolor="#000000" link="#FFFFFF" alink="#FFFFFF" vlink="#FFFFFF">

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


<DIV id="news" class="nav" style="top:20px" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)" onClick="gotoURL()">자바 스크립트</DIV>
<DIV id="contact" class="nav" style="top:60px" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)" onClick="gotoURL()">CGI 스크립트</DIV>
<DIV id="chart" class="nav" style="top:100px" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)" onClick="gotoURL()">자바 Applets</DIV>
<DIV id="besteller" class="nav" style="top:140px" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)" onClick="gotoURL()">홈 페이지로</DIV>
<DIV id="scriptkiller" class="nav" style="top:180px" onMouseOver="startfilter(this)" onMouseOut="stopfilter(this)" onClick="gotoURL()">HELP</DIV>