웹마스터 팁
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
Marquee 태그를 이용한 간단한 스크립트
2003.08.06 23:00
관리자인데도 불구하고 글 많이 못 올려 민망할 따름입니다-_-;;;
이번 소스는 그냥 심심하던차에 만들게 된 것입니다(-_-;)
응용하시면 괜찮은 무언가(?)가 나올듯;;;
그럼 소스 나갑니다^_^
Preview : http://www.zective.com/sample/marquee.html
--------------------------------------------------------------------------------------------------------------------------------------------
<!-- Created by Zective -->
<html>
<title>아니 이게 대체 뭐여º∀º)?</title>
<head>
<style>
body {font-family:tahoma; font-size:11px; color:highlight;}
A:visited {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
A:link {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
A:hover {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
A:active {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
</style>
<script>
// mq1 는 좌우 제어
// mq2는 상하 제어
// 물론 소스 수정하면 동시 제어도 가능;;
// 실행
function move(direction, kind) {
// mq1 인지 mq2 인지 구분하여 그에 맞게 Marquee 태그 실행
if(kind == 1) {
mq1.start();
} else {
mq2.start();
}
// 왼쪽 (mq1)
if(direction == 'L' || direction == 'l') {
mq1.direction = 'left';
}
// 오른쪽 (mq1)
else if(direction == 'R' || direction == 'r') {
mq1.direction = 'right';
}
// 위쪽 (mq2)
else if(direction == 'U' || direction == 'u') {
mq2.direction = 'up';
}
// 아래쪽 (mq2)
else {
mq2.direction = 'down';
}
}
// 정지
function stop(kind) {
// mq 인지 mq2 인지 구분하여 그에 맞게 Marquee 태그 정지
if(kind == 1) {
mq1.stop();
} else {
mq2.stop();
}
}
</script>
</head>
<!-- 페이지를 다 읽으면 Marquee 태그 정지 -->
<body onload="stop(1); stop(2);">
<center>
<br><br><br>
<marquee id="mq1" width="100" truespeed scrollamount="1" scrolldelay="15" bgcolor="ghostwhite" style="border:1 solid highlight;">123</marquee>
<br><br>
<a href="javascript:;" onmouseover="move('L', 1);" onmouseout="stop(1)" onfocus="this.blur();">왼쪽으로</a> | <a href="javascript:;" onmouseover="move('R', 1);" onmouseout="stop(1)" onfocus="this.blur();">오른쪽으로</a>
<!-- 에헤라디야~ -->
<br><br><br>
<!-- 에헤라디야~ -->
<marquee id="mq2" width="100" height="100" truespeed scrollamount="1" scrolldelay="15" bgcolor="ghostwhite" style="border:1 solid highlight;">123</marquee>
<br><br>
<a href="javascript:;" onmouseover="move('U', 2);" onmouseout="stop(2)" onfocus="this.blur();">위쪽으로</a> | <a href="javascript:;" onmouseover="move('D', 2);" onmouseout="stop(2)" onfocus="this.blur();">아래쪽으로</a>
<!-- 에헤라디야~ -->
<br><br><br><br><br>
<!-- 에헤라디야~ -->
<font style="font size:72px 돋움;" onmouseover="this.innerHTML='( º▽º)!';" onmouseout="this.innerHTML='( º∀º)?';" style="cursor:default;">( º∀º)?</font>
</center>
</body>
</html>
이번 소스는 그냥 심심하던차에 만들게 된 것입니다(-_-;)
응용하시면 괜찮은 무언가(?)가 나올듯;;;
그럼 소스 나갑니다^_^
Preview : http://www.zective.com/sample/marquee.html
--------------------------------------------------------------------------------------------------------------------------------------------
<!-- Created by Zective -->
<html>
<title>아니 이게 대체 뭐여º∀º)?</title>
<head>
<style>
body {font-family:tahoma; font-size:11px; color:highlight;}
A:visited {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
A:link {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
A:hover {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
A:active {text-decoration:none; cursor:hand; font-family:tahoma; font-size:11px; color:highlight;}
</style>
<script>
// mq1 는 좌우 제어
// mq2는 상하 제어
// 물론 소스 수정하면 동시 제어도 가능;;
// 실행
function move(direction, kind) {
// mq1 인지 mq2 인지 구분하여 그에 맞게 Marquee 태그 실행
if(kind == 1) {
mq1.start();
} else {
mq2.start();
}
// 왼쪽 (mq1)
if(direction == 'L' || direction == 'l') {
mq1.direction = 'left';
}
// 오른쪽 (mq1)
else if(direction == 'R' || direction == 'r') {
mq1.direction = 'right';
}
// 위쪽 (mq2)
else if(direction == 'U' || direction == 'u') {
mq2.direction = 'up';
}
// 아래쪽 (mq2)
else {
mq2.direction = 'down';
}
}
// 정지
function stop(kind) {
// mq 인지 mq2 인지 구분하여 그에 맞게 Marquee 태그 정지
if(kind == 1) {
mq1.stop();
} else {
mq2.stop();
}
}
</script>
</head>
<!-- 페이지를 다 읽으면 Marquee 태그 정지 -->
<body onload="stop(1); stop(2);">
<center>
<br><br><br>
<marquee id="mq1" width="100" truespeed scrollamount="1" scrolldelay="15" bgcolor="ghostwhite" style="border:1 solid highlight;">123</marquee>
<br><br>
<a href="javascript:;" onmouseover="move('L', 1);" onmouseout="stop(1)" onfocus="this.blur();">왼쪽으로</a> | <a href="javascript:;" onmouseover="move('R', 1);" onmouseout="stop(1)" onfocus="this.blur();">오른쪽으로</a>
<!-- 에헤라디야~ -->
<br><br><br>
<!-- 에헤라디야~ -->
<marquee id="mq2" width="100" height="100" truespeed scrollamount="1" scrolldelay="15" bgcolor="ghostwhite" style="border:1 solid highlight;">123</marquee>
<br><br>
<a href="javascript:;" onmouseover="move('U', 2);" onmouseout="stop(2)" onfocus="this.blur();">위쪽으로</a> | <a href="javascript:;" onmouseover="move('D', 2);" onmouseout="stop(2)" onfocus="this.blur();">아래쪽으로</a>
<!-- 에헤라디야~ -->
<br><br><br><br><br>
<!-- 에헤라디야~ -->
<font style="font size:72px 돋움;" onmouseover="this.innerHTML='( º▽º)!';" onmouseout="this.innerHTML='( º∀º)?';" style="cursor:default;">( º∀º)?</font>
</center>
</body>
</html>
댓글 7
-
뒹굴리스트
2003.08.06 23:01
-
[아틀]아렌티
2003.08.08 10:45
아 저기요 -_- 계속 돌지 말고 -_-
끝에가면 멈추게 할수는없나요? -
Pe-i
2003.08.08 17:37
마지막 방법 '롤오버'로 응용할수도 있겠네요^-^& -
NZEO행동대장
2003.08.09 10:54
-
뒹굴리스트
2003.08.09 12:03
NZEO행동대장 // 그거 제가 올린 글입니다만...'ㅡ'); -
스티치*FREE*
2003.08.13 09:41
위/아래/왼쪽/오른쪽을 화살표로 대체하면 스크롤 안내로도 사용할 수 있을듯 -
대류
2003.08.14 12:55
공지사항용 최근게시물에 응용하면 좋겠네요
제목 | 글쓴이 | 날짜 |
---|---|---|
Marquee 태그를 이용한 간단한 스크립트 [7] | 뒹굴리스트 | 2003.08.06 |
노프레임 홈페이지 수정 편리하게 &용량줄이기. [9] | 세죠위그이 | 2003.07.15 |
제로보드 사용시 아이프레임의 크기를 내용에 따라 바꿔주는 스크립트 [7] | 쿨리안 | 2003.06.28 |
Top, Back 함께사용하기 | sharim | 2003.06.11 |
자바스크립트로 두개 이상의 페이지 동시에 열기. [4] | 이성헌 | 2003.06.08 |
오른쪽마우스 클릭금지,드래그금지,하단주소 숨기기 한꺼번에~ [8] | 한길 | 2003.06.03 |
크롬리스(Chromless) 웹어플리케이션 -6 (최종) [4] | sundew | 2003.05.30 |
크롬리스(Chromless) 웹어플리케이션 -5 [3] | sundew | 2003.05.28 |
오른쪽 버튼 클릭시 북마크창 띄우기(1석2조 방식) [4] | RedEye(rinja) | 2003.05.23 |
손님컴퓨터에 내홈피 즐겨찾기 원클릭으로추가시키기 [5] | 호호짱 | 2003.05.23 |
크롬리스(Chromless) 웹어플리케이션 -3 [5] | sundew | 2003.05.21 |
오늘 날짜와 시간 [3] | Brown | 2003.05.20 |
크롬리스(Chromless) 웹어플리케이션 -2 [5] | sundew | 2003.05.18 |
크롬리스(Chromless) 웹어플리케이션 -1 [1] | sundew | 2003.05.17 |
XXX는 객체가 아닙니다. [1] | RedEye | 2003.05.12 |
자바스크립트의 활용함에 대해.... [5] | RedEye | 2003.05.12 |
자바스크립트의 활용함에 대해 2 .... [1] | RedEye | 2003.05.18 |
[벅스 전용] 랜덤 음악 재생 Javascript. [1] | sundew | 2003.05.11 |
이벤트 핸들러 (Event Handler) 모음 [2] | 아이쿠 | 2003.05.10 |
png-24 포맷 알파값 이미지 로딩하기 [9] | D3 | 2003.04.20 |
제 컴에서 돌리느냐고 테스트용 페이지 소스로 올려졌습니다(-_-;)
중간중간 쓸데없는 것들이 있으니 살포시 무시하시고 넘어가시면 되겠습니다-_-;;;;;;;;