인터넷정보

일정 간격으로 텍스트 바꾸기

알 수 없는 사용자 2007. 10. 18. 14:08
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>일정 간격으로 텍스트 바꾸기</title>
<link rel="stylesheet" type= "text/css" href="../style.css">
<script language="JavaScript">
<!--
function showlayer(str)
{
        if(document.layers) {
                document.layers["myText"].visibility = "show"
                document.layers["myText2"].visibility = "hide"
                document.layers["myText3"].visibility = "hide"
                setTimeout("showlayer2()", 2000);
        }
        else {
                document.all["myText"].style.visibility = "visible"
                document.all["myText2"].style.visibility = "hidden"
                document.all["myText3"].style.visibility = "hidden"
                setTimeout("showlayer2()", 2000);
        }
}

function showlayer2(str) {
        if(document.layers) {
                document.layers["myText"].visibility = "hide"
                document.layers["myText2"].visibility = "show"
                document.layers["myText3"].visibility = "hide"
                setTimeout("showlayer3()", 2000);
        }
        else {
                document.all["myText"].style.visibility = "hidden"
                document.all["myText2"].style.visibility = "visible"
                document.all["myText3"].style.visibility = "hidden"
                setTimeout("showlayer3()", 2000);
        }
}

function showlayer3(str) {
        if(document.layers) {
                document.layers["myText"].visibility = "hide"
                document.layers["myText2"].visibility = "hide"
                document.layers["myText3"].visibility = "show"
                setTimeout("showlayer()", 2000);
        }
        else {
                document.all["myText"].style.visibility = "hidden";
                document.all["myText2"].style.visibility = "hidden";
                document.all["myText3"].style.visibility = "visible";
                setTimeout("showlayer()", 2000);
        }
}

// end of script -->
</script>
<meta name="GENERATOR" content="Namo WebEditor v4.0">
</head>
<body onLoad="showlayer();">
<center>
- 일정 간격으로 텍스트 바꾸기 -
<div id="myText" style="color:999999; width:300px; height:200px; position:absolute; left:200px; top:50px; z-index:1; visibility:visible;">
<p>안녕하세여 ^^</p>
</div>

<div id="myText2" style="color:666666; width:300px; height:200px; position:absolute; left:200px; top:50px; z-index:1; visibility:visible;">
<p>강좌 보고 이쁜 홈피 많이 만드세여 ^^</p>
</div>

<div id="myText3" style="color:000000; width:300px; height:200px; position:absolute; left:200px; top:50px; z-index:1; visibility:visible;">
<p>모르시는거 있음 물어보시구여</p>
</div>

<table width="600" cellpadding="2" cellspacing="2"><tr><td height="60">

</td></tr>
<tr><td bgcolor="#FDFAEF">
<html><br><head><br><font color="red"><script language="JavaScript"><br><!--<br>function
                showlayer(str)<br>{<br>if(document.layers)
                {<br>document.layers["myText"].visibility
                = "show"<br>document.layers["myText2"].visibility
                = "hide"<br>document.layers["myText3"].visibility
                = "hide"<br>setTimeout("showlayer2()",
                </font><font color="green"><b>2000</b></font><font color="red">);<br>}<br>else
                {<br>document.all["myText"].style.visibility
                = "visible"<br>document.all["myText2"].style.visibility
                = "hidden"<br>document.all["myText3"].style.visibility
                = "hidden"<br>setTimeout("showlayer2()",
                </font><font color="green"><b>2000</b></font><font color="red">);<br>}<br>}<br><br>function
                showlayer2(str) {<br>if(document.layers)
                {<br>document.layers["myText"].visibility
                = "hide"<br>document.layers["myText2"].visibility
                = "show"<br>document.layers["myText3"].visibility
                = "hide"<br>setTimeout("showlayer3()",</font><font color="green"><b>2000</b></font><font color="red">);<br>}<br>else
                {<br>document.all["myText"].style.visibility
                = "hidden"<br>document.all["myText2"].style.visibility
                = "visible"<br>document.all["myText3"].style.visibility
                = "hidden"<br>setTimeout("showlayer3()",
                </font><font color="green"><b>2000</b></font><font color="red">);<br>}<br>}<br><br>function
                showlayer3(str) {<br>if(document.layers)
                {<br>document.layers["myText"].visibility
                = "hide"<br>document.layers["myText2"].visibility
                = "hide"<br>document.layers["myText3"].visibility
                = "show"<br>setTimeout("showlayer()",
                </font><font color="green"><b>2000</b></font><font color="red">);<br>}<br>else
                {<br>document.all["myText"].style.visibility
                = "hidden";<br>document.all["myText2"].style.visibility
                = "hidden";<br>document.all["myText3"].style.visibility
                = "visible";<br>setTimeout("showlayer()",
                </font><font color="green"><b>2000</b></font><font color="red">);<br>}<br>}<br><br>//
                end of script --><br></script></font><br></head><br><body
                <font color="red">onLoad="showlayer();"</font>><br><font color="red"><div
                id="myText" style="color:</font><font color="green"><b>글자색</b></font><font color="red">;
                width:</font><font color="green"><b>넓이</b></font><font color="red">px;
                height:</font><font color="green"><b>길이</b></font><font color="red">px;
                position:absolute; left:</font><font color="green"><b>글자위치(왼쪽)</b></font><font color="red">px;
                top:</font><font color="green"><b>글자위치(위)</b></font><font color="red">px;
                z-index:1; visibility:visible;"><br></font><font color="green"><b>쓰고싶은
                말</b></font><font color="red"><br></div><br></font>
                <p><font color="red"><div id="myText2" style="color:</font><font color="green"><b>글자색</b></font><font color="red">;
                width:</font><font color="green"><b>넓이</b></font><font color="red">px;
                height:</font><font color="green"><b>길이</b></font><font color="red">px;
                position:absolute; left:</font><font color="green"><b>글자위치(왼쪽)</b></font><font color="red">px;
                top:</font><font color="green"><b>글자위치(위)</b></font><font color="red">px;
                z-index:1; visibility:visible;"><br></font><font color="green"><b>쓰고싶은
                말</b></font><font color="red"><br></div><br></font>
                <p><font color="red"><div id="myText3" style="color:</font><font color="green"><b>글자색</b></font><font color="red">;
                width:</font><font color="green"><b>넓이</b></font><font color="red">px;
                height:</font><font color="green"><b>길이</b></font><font color="red">px;
                position:absolute; left:</font><font color="green"><b>글자위치(왼쪽)</b></font><font color="red">px;
                top:</font><font color="green"><b>글자위치(위)</b></font><font color="red">px;
                z-index:1; visibility:visible;"><br></font><font color="green"><b>쓰고싶은
                말</b></font><font color="red"><br></div><br></font><font color="black"></body><br></html></font>
</td></tr></table>
<br>
<center>
위와 같이 소스 넣고 초록색으로 된 부분만 수정해주세여<br>위쪽에 2000이라고 써있는
        숫자들은 글씨가 바뀌는 속도예여 숫자가 클수록 느려져여 ^^<br><br>

       
        </body>
</html>
반응형