<html>
<head>
<title> 이미지겔러리</title>
<!-- [1단계] 아래의 코드를 <head> 와 </head> 사이에 붙여 넣으세요 -->
<style type="text/css">
.gallerycontroller{
width: 320px /*아래쪽 상자의 가로크기*/
}
.gallerycontent{
width: 100px; /*사진이 나오는 상자의 가로*/
height: 240px; /*높이*/
border: 0px solid black; /*테두리*/
background-color: #DFDFFF; /*배경색*/
padding: 0px; /*안쪽여백*/
display: block;
}
</style>
<script type="text/javascript">
var tickspeed=2000 // 각 슬라이드 지연시간(3000=3초)
var displaymode="auto" // 초기 디스플레이 모드 ("auto" 혹은 "manual")
if (document.getElementById){
document.write('<style type="text/css">n')
document.write('.gallerycontent{display:none;}n')
document.write('</style>n')
}
var selectedDiv=0
var totalDivs=0
function getElementbyClass(classname){
partscollect=new Array()
var inc=0
var alltags=document.all? document.all.tags("DIV") : document.getElementsByTagName("*")
for (i=0; i<alltags.length; i++){
if (alltags[i].className==classname)
partscollect[inc++]=alltags[i]
}
}
function contractall(){
var inc=0
while (partscollect[inc]){
partscollect[inc].style.display="none"
inc++
}
}
function expandone(){
var selectedDivObj=partscollect[selectedDiv]
contractall()
selectedDivObj.style.display="block"
temp.options[selectedDiv].selected=true
selectedDiv=(selectedDiv<totalDivs-1)? selectedDiv+1 : 0
if (displaymode=="auto")
autocontrolvar=setTimeout("expandone()",tickspeed)
}
function populatemenu(){
temp=document.gallerycontrol.menu
for (m=temp.options.length-1;m>0;m--)
temp.options[m]=null
for (i=0;i<totalDivs;i++){
var thesubject=partscollect[i].getAttribute("subject")
thesubject=(thesubject=="" || thesubject==null)? "HTML Content "+(i+1) : thesubject
temp.options[i]=new Option(thesubject,"")
}
temp.options[0].selected=true
}
function manualcontrol(menuobj){
if (displaymode=="manual"){
selectedDiv=menuobj
expandone()
}
}
function preparemode(themode){
displaymode=themode
if (typeof autocontrolvar!="undefined")
clearTimeout(autocontrolvar)
if (themode=="auto"){
document.gallerycontrol.menu.disabled=true
autocontrolvar=setTimeout("expandone()",tickspeed)
}
else
document.gallerycontrol.menu.disabled=false
}
function startgallery(){
document.getElementById("controldiv").style.display="block"
getElementbyClass("gallerycontent")
totalDivs=partscollect.length
populatemenu()
for (i=0; i<document.gallerycontrol.mode.length; i++){
if (document.gallerycontrol.mode[i].checked)
displaymode=document.gallerycontrol.mode[i].value
}
if (displaymode=="auto")
document.gallerycontrol.menu.disabled=true
expandone()
}
if (window.addEventListener)
window.addEventListener("load", startgallery, false)
else if (window.attachEvent)
window.attachEvent("onload", startgallery)
else if (document.getElementById)
window.onload=startgallery
</script>
<!----------------- 여기까지 ----------------->
</head>
<body>
<!-- [2단계] 아래의 방법으로 <body> 와 </body> 태그 사이에 붙여 넣으세요 -->
<div class="gallerycontent" subject="사진-1"> <!--제목을 넣습니다-->
<img src="이미지주소"><!--사진의 위치 및 설명을 넣습니다-->
<br>첫번째 사진입니다
</div>
<div class="gallerycontent" subject="사진-2">
<img src="이미지주소">
<br>두번째 사진입니다
</div>
<div class="gallerycontent" subject="사진-3">
<img src="이미지주소">
<br>세번째 사진입니다
</div>
<div id="controldiv" style="display:none" class="gallerycontroller">
<form name="gallerycontrol">
<select class="gallerycontroller" size="3" name="menu" onChange="manualcontrol(this.options.selectedIndex)">
<option>Blank form</option>
</select><br>
슬라이드쇼 <input type="radio" checked name="mode" value="auto" onClick="preparemode('auto')"> <br>
수동으로 보기 <input type="radio" name="mode" value="manual" onClick="preparemode('manual')">
</form>
</div>
<!----------------- 여기까지 ----------------->
</body>
</html>
댓글 0
번호 | 제목 | 조회 수 | 날짜 |
---|---|---|---|
24 | 테터툴즈(텍스트큐브) http://www.textcube.org | 1351 | 2008.11.10 |
23 | 그누보드 http://sir.co.kr | 1501 | 2008.11.10 |
22 | 제로보드 http://www.zeroboard.com | 1422 | 2008.11.10 |
21 | 카메라 대여점 http://www.slrrent.com | 1213 | 2008.11.10 |
20 | 옛파일 http://www.atfile.com | 2977 | 2008.11.10 |
19 | 80포트 http://www.80port.com | 4081 | 2008.11.10 |
18 | 포토샵 스타일 파일 | 18747 | 2008.11.09 |
17 | 니콘 컷수 확인 프로그램.... | 12855 | 2008.10.22 |
16 | 색상 편집기 | 11706 | 2008.10.08 |
15 | 외부링크 금지 소스 | 14677 | 2008.05.22 |
14 | 스케치효과 포토샵 액션 | 12278 | 2008.05.13 |
13 | 수채화효과 포토샵 액션파일.... | 16840 | 2008.05.13 |
12 | 심심풀이 토정비결 | 11231 | 2007.12.14 |
» | 이미지 갤러리 (슬라이드쇼, 수동보기 선택) | 267072 | 2006.11.25 |
10 | 틀 테이블 만들기 | 10852 | 2006.10.27 |
9 | 띠 맞추기 | 14210 | 2006.10.26 |
8 | 색상표 | 13032 | 2006.10.08 |
7 | [포토샵] 샤픈 액션 | 15244 | 2006.09.20 |
6 | [포토샵] 오래된사진효과 액션파일 | 12836 | 2006.09.20 |
5 | 초오속 에관한 자료 | 12326 | 2006.09.14 |