본문 바로가기

javascript

스크롤되어 날아와 자리잡는 텍스트 메세지

<HTML>
<HEAD>
<TITLE> Script </TITLE>
</HEAD>

<BODY>

<!------ 아래의 방식으로 BODY 부분에 스크립트나 태그를 붙여 넣으세요 ------------------->

<script>
if (document.layers) // 네츠케이프를 위한 코드
var ns4def=''
</script>


<!------ 텍스트가 보여질 곳 입니다. 원하는 스타일로 수정 해 보세요 ----------->

<h2 align=center id="flyin" style="position:relative;left:-400;font-style:italic" style=&{ns4def};><font face="Arial">Welcome to Home Page !! </font></h2>

<!-------------------- 플라잉 텍스트 스크립트 ------------------>

<script language="JavaScript1.2">

if (document.getElementById||document.all)
var crossheader=document.getElementById? document.getElementById("flyin").style : document.all.flyin.style

function animatein(){
if (parseInt(crossheader.left)<0)
crossheader.left=parseInt(crossheader.left)+20
else{
crossheader.left=0
crossheader.fontStyle="normal"
clearInterval(start)
}
}

if (document.getElementById||document.all)
start=setInterval("animatein()",50)

</script>

</BODY>
</HTML>