문장이 계속해서 바뀌는 스크립트
텍스트 변환 자바스크립트
일정한 시간 간격을 두고 브라우저의 텍스트가 계속 변화됩니다.
네츠케이프와 익스플로러가 호환이 안됩니다
어쩔 수 없이 넷스케이프용과 익스플로러용의 두가지 코드를 모두 입력해야 하겠습니다
// HEAD에 들어갈 자바스크립트
<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()", 5000); // 시간조절
}
else //익스플로러용
{
document.all["myText"].style.visibility = "visible"
document.all["myText2"].style.visibility = "hidden"
document.all["myText3"].style.visibility = "hidden"
setTimeout("showlayer2()", 5000);
}
}
function showlayer2(str)
{
if(document.layers)
{
document.layers["myText"].visibility = "hide"
document.layers["myText2"].visibility = "show"
document.layers["myText3"].visibility = "hide"
setTimeout("showlayer3()", 5000);
}
else
{
document.all["myText"].style.visibility = "hidden"
document.all["myText2"].style.visibility = "visible"
document.all["myText3"].style.visibility = "hidden"
setTimeout("showlayer3()", 5000);
}
}
function showlayer3(str)
{
if(document.layers)
{
document.layers["myText"].visibility = "hide"
document.layers["myText2"].visibility = "hide"
document.layers["myText3"].visibility = "show"
setTimeout("showlayer()", 5000);
}
else
{
document.all["myText"].style.visibility = "hidden";
document.all["myText2"].style.visibility = "hidden";
document.all["myText3"].style.visibility = "visible";
setTimeout("showlayer()", 5000);
}
}
// end of script -->
</script>
// BODY에 들어갈 내용
// 이 부분은 나모에서 작업하면 DIV ID 관련 태그를 나모가 삭제시키기 때문에 정상적으로 작동하지 않습니다.
// 반드시 메모장이나 다른 텍스트 에디터를 이용해 주세요
// top:250은 글자의 브라우저상에서 위치입니다. 원하시는 대로 변경가능 합니다.
<body onLoad="showlayer()">
<div id="myText" style="position: absolute; visibility: visible; color:#EAEAAE; text-align:center; top:250; font-weight:bold;" align="center">
<p>첫 번째 입니다.<br>
첫 번째 메시지를 넣어주세요<br>
</p>
</div><div id="myText2" style="position: absolute; visibility: visible; color:#EAEAAE; text-align:center; top:250; font-weight:bold;" align="center">
<p>두 번째 입니다.<br>
두 번째 메시지를 넣어주세요<br>
</p>
</div><div id="myText3" style="position: absolute; visibility: visible; color:#EAEAAE; text-align:center; top:250; font-weight:bold;" align="center">
<p>세 번째 입니다.<br>
네 번째 다섯 번째 얼마든지 넣어주세요<br>
</p>
</div>
댓글 0
- 전체
- 자유게시판
- 컴퓨터/IT
- 연애/결혼
- 생활지혜/상식
- 홍보팁
- 재테크/카드
- 카페/블로그
- 여행
- 부부생활
- 심리
- 음악/미술
- 법률
- 건강
- 역사
- 인테리어/DIY
- 밀리터리
- 해외직구
- 예능/영화
- 미스테리
- 임신/육아
- 다이어트
- 음식/주방/요리
- 운전/자동차
- 낚시
- 휴대폰
- 운동
- 게임/만화
- 취업/알바/부업
- 사진
- 이사/이민
- 패션/뷰티
- 경제/주식
- 부동산
- 그 외..
| 번호 | 제목 | 글쓴이 |
|---|---|---|
| 3421 | 심장 건강에 좋은 습관 8가지 [1] | 뉴퐁 |
| 3420 | 잠잘 때 왼쪽으로 자면 생기는 신체 변화 7가지 [2] | 뉴퐁 |
| 3419 | 스트레스를 줄이는 놀라운 방법 6가지 [2] | 싹쓰리 |
| 3418 | 여성이 팬티에 대해 알아야 할 7가지 [3] | 싹쓰리 |
| 3417 | 끓였던 물을 또 끓이면 안 되는 이유 [1] | 싹쓰리 |
| 3416 | "치주염 환자, 코로나 감염 땐 사이토카인 폭풍 가능성 높아" [1] | 쌍둥이맘 |
| 3415 | 스마트스토어 상위 노출 꿀팁. 경쟁률 낮은 세부키워드 뽑는 방법 [2] | 나혼자번다 |
| 3414 |
열감지 안면인식 출입관리솔루션 400만원짜리를 40만원에(정부지원사업)
[1] | 나혼자번다 |
| 3413 | 전자렌지요리 만능 레시피 대공개!! [3] | 나혼자번다 |
| 3412 | 식초로 집안을 반짝반짝하게!! 식초 청소법 [4] | 쌍둥이맘 |
| 3411 | 마시고 남은 김빠진 맥주 활용법 [2] | 쌍둥이맘 |
| 3410 | 계란을 먹은 후 절대 바로 먹으면 안되는 것들 | 쌍둥이맘 |
| 3409 | 아주 유용한 커피상식 | 쌍둥이맘 |
| 3408 | 간 건강과 지방간 완화에 아주 효과적인 채소는? [2] | 싹쓰리 |
| 3407 | 골다공증 예방과 뼈에 아주 좋은 음식 8가지 | 싹쓰리 |
| 3406 | 체했을 때, 감기 걸렸을 때, 관절염 통증에는 이것이 최고!! | 싹쓰리 |
| 3405 | 장을 편안하게 하면서 소화를 돕는 식품 5가지 [1] | 싹쓰리 |
| 3404 | 초보운전자가 반드시 알아야 하는 고속도로 운전매너 5 [1] | 싹쓰리 |
| 3403 | 머리카락이나 두피를 상하게 하는 사소한 습관 5 | 라이믹스 |
| 3402 | 어둡고 칙칙한 피부를 환하게 해주는 필수적인 습관 5 | 라이믹스 |