네온 효과를 보여주는 텍스트 스크롤러 입니다.
2가지의 네온 색상을 추가로 설정 할 수 있습니다
<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title> Script </title>
<meta http-equiv=content-type content=text/html; charset=euc-kr>
</head>
<body bgcolor=black>
<h2>
<!---- 아래와 같은 방법으로 태그와 코드를 복사 해 넣으세요 --->
<script language="JavaScript1.2">
// 보여줄 메세지를 설정하세요
var message="JavaScript Source Bank"
var neonbasecolor="gray" // 바탕 글자색
var neontextcolor="yellow" // 네온색상1
var neontextcolor2="#FFFFA8" // 네온색상2
var flashspeed=100 // 속도(1/1000초)
var flashingletters=3 // 네온텍스트의 갯수
var flashingletters2=1// 두번째 네온 텍스트의 갯수
var flashpause=0 // 플래시 사이클의 지연시간
var n=0
if (document.all||document.getElementById){
document.write('<font color="'+neonbasecolor+'">')
for (m=0;m<message.length;m++)
document.write('<span id="neonlight'+m+'">'+message.charAt(m)+'</span>')
document.write('</font>')
}
else
document.write(message)
function crossref(number){
var crossobj=document.all? eval("document.all.neonlight"+number) : document.getElementById("neonlight"+number)
return crossobj
}
function neon(){
if (n==0){
for (m=0;m<message.length;m++)
crossref(m).style.color=neonbasecolor
}
crossref(n).style.color=neontextcolor
if (n>flashingletters-1) crossref(n-flashingletters).style.color=neontextcolor2
if (n>(flashingletters+flashingletters2)-1) crossref(n-flashingletters-flashingletters2).style.color=neonbasecolor
if (n<message.length-1)
n++
else{
n=0
clearInterval(flashing)
setTimeout("beginneon()",flashpause)
return
}
}
function beginneon(){
if (document.all||document.getElementById)
flashing=setInterval("neon()",flashspeed)
}
beginneon()
</script></h2>
<!--------------------------- 여기까지 ---------------------------->
</body>
</html>