Menu

맛간메뉴

2016. 5. 30. 01:34

안개핑 Javascript

 

 

<HTML><HEAD>

<SCRIPT language=JavaScript>

<!--

var oldtext

var newtext

var newlink

var speed=10 // 쉐이크 속력 - 클수록 느리다

var i_speed=1.1

var i_text=1

var timer

 

function startshake(thislink) {

if (document.all) {

newlink=eval("document.getElementById('"+thislink+"')")

oldtext=newlink.childNodes[0].nodeValue

shaketext()

}

}

 

function shaketext() {

if (speed<=200) {

if (i_text<0) {newtext=oldtext+" "}

else if (i_text>0) {newtext=" "+oldtext}

newlink.childNodes[0].nodeValue=newtext;

i_text=i_text*-1

speed=speed*i_speed

timer=setTimeout("shaketext()",speed)

}

else {

clearTimeout(timer)

speed=20

newlink.childNodes[0].nodeValue=oldtext;

}

}

 

function stopshake() {

if (document.all) {

clearTimeout(timer)

speed=20

newlink.childNodes[0].nodeValue=oldtext;

}

}

//-->

</SCRIPT>

<!--

링크가 쉐이크 되는부분이다.

추가시는 name의 link만 차례대로 해주면 된다.

중요 : font를 이용하면 안된다.

//-->

<META content="MSHTML 6.00.2600.0" name=GENERATOR></HEAD>

<BODY>&nbsp;&nbsp;&nbsp;<A onmouseover=startshake(this.name)

onmouseout=stopshake() href="http://lhk6873.nazoa.cc/" target=_blank

name=link1>테스트</A><BR>&nbsp;&nbsp;&nbsp;<A onmouseover=startshake(this.name)

onmouseout=stopshake() href="http://lhk6873.nazoa.cc/" target=_blank

name=link2>넘 웃긴다</A><BR>&nbsp;&nbsp;&nbsp;<A onmouseover=startshake(this.name)

onmouseout=stopshake() href="http://lhk6873.nazoa.cc/" target=_blank

name=link3>미친메뉴</A><BR>&nbsp;&nbsp;&nbsp;<A onmouseover=startshake(this.name)

onmouseout=stopshake() href="http://lhk6873.nazoa.cc/" target=_blank

name=link4>나름대로는 귀엽당</A><BR>&nbsp;&nbsp;&nbsp;<A

onmouseover=startshake(this.name) onmouseout=stopshake()

href="http://lhk6873.nazoa.cc/" target=_blank name=link5>잼있당</A></BODY></HTML>