이미지 누르면 현재창 닫는 스크립트 질문드려요

· 12년 전 · 1112 · 3
<div class="box size1">
<div class="lt-photo-link">
<a href="#" title="off">
<span class="thumb"><img src="이미지주소" alt="off"></span>
<span class="img-title"><em>나가기</em></span>
</a>
</div>
</div>


이렇게 되있는 소스인데요 여기서 이미지 클릭하면 현재창(브라우저) 꺼지게 하려면
어떻게 해야하나요.......?
스크립트언어를 제대로 배운적이 없어서 모르겠네요..... 소스 좀 부탁드려요 ...
|

댓글 3개

<script>
function closing() {
window.close();
}
</script>

<div class="box size1">
<div class="lt-photo-link">
<a href="javascript:closing();" title="off">
<span class="thumb"><img src="이미지주소" alt="off"></span>
<span class="img-title"><em>나가기</em></span>
</a>
</div>
</div>
안되네요 ㅠㅠ
이렇게 바꿔보세요

<a href="javascript:;" onclick="self.close();" title="off">
<span class="thumb"><img src="이미지주소" alt="off"></span>
<span class="img-title"><em>나가기</em></span>
</a>
댓글을 작성하시려면 로그인이 필요합니다. 로그인

자유게시판

+
제목 글쓴이 날짜 조회
12년 전 조회 1,094
12년 전 조회 1,077
12년 전 조회 1,164
12년 전 조회 1,090
12년 전 조회 5,092
12년 전 조회 1,123
12년 전 조회 1,786
12년 전 조회 1,166
12년 전 조회 1,081
12년 전 조회 1,363
12년 전 조회 6,835
12년 전 조회 1,806
12년 전 조회 1,091
12년 전 조회 1,099
12년 전 조회 1,113
12년 전 조회 1,201
12년 전 조회 1,834
12년 전 조회 1,166
12년 전 조회 1,093
12년 전 조회 1,256
12년 전 조회 1,087
12년 전 조회 1,121
12년 전 조회 1,076
12년 전 조회 1,092
12년 전 조회 1,127
12년 전 조회 1,212
12년 전 조회 2,437
12년 전 조회 6,256
12년 전 조회 2,507
12년 전 조회 1,102
🐛 버그신고