Notice
Recent Posts
Recent Comments
Link
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |
Tags
- DS718+
- Getrows
- 크로스 컴파일
- lsusb
- replace
- jquery 레이어
- form
- AC1300
- 무선랜카드
- readonly
- ajax
- 커널
- XMLHTTP
- include
- utf-8
- disabled
- PHP GCM
- println
- 시놀로지
- RTL88x2BU
- ASP
- Injection
- euc-kr
- submit
- jQuery
- 따라다니는 배너
- javascript
- synology
- FileSystemObject
- SQL Injection
Archives
- Today
- Total
아는 것이 좋은 것이다.
[JavaScript] 게시판 상세내용 열고 닫기 본문
<script type="text/javascript"> <!-- function open_detail(obj){ var reset = document.getElementsByClassName("comment a").length; //alert(reset); for(i=1; i <= reset; i++){ //alert(document.getElementById('review' + i) + ", " + document.getElementById('review_re' + i)); //document.getElementById('review'+ i).style.display = 'none'; //document.getElementById('review_re'+ i).style.display = 'none'; } //alert(document.getElementById('review'+ obj).style.display); if (document.getElementById('review'+ obj).style.display == "") { document.getElementById('review'+ obj).style.display = 'none'; document.getElementById('review_re'+ obj).style.display = 'none'; }else{ document.getElementById('review'+ obj).style.display = ''; document.getElementById('review_re'+ obj).style.display = ''; } //document.getElementById('review'+ obj).style.display = ''; //document.getElementById('review_re'+ obj).style.display = ''; } //--> </script> <table class="detailList" border="1" cellspacing="2" cellpadding="0" width="600"> <colgroup> <col width="10%"> <col width="55%"> <col width="20%"> <col width="15%"> <col width="10%"> </colgroup> <thead> <tr> <th>번호</th> <th>제목</th> <th>작성자</th> <th>등록일</th> <th>조회수</th> </tr> </thead> <tbody> <tr> <th>6</th> <td><a href="JavaScript:;" onclick="JavaScript: open_detail('1');">제목1</a></td> <th>작성자1</th> <th>2014.05.15</th> <th>526</th> </tr> <tr class="comment a" id="review1" style="display: none;"> <th></th> <td colspan="4">상세내용1</td> </tr> <tr> <th>5</th> <td><a href="JavaScript:;" onclick="JavaScript: open_detail('2');">제목2</a></td> <th>작성자2</th> <th>2014.05.15</th> <th>526</th> </tr> <tr class="comment a" id="review2" style="display: none;"> <th></th> <td colspan="4">상세내용2</td> </tr> <tr> <th>4</th> <td><a href="JavaScript:;" onclick="JavaScript: open_detail('3');">제목3</a></td> <th>작성자3</th> <th>2014.05.15</th> <th>526</th> </tr> <tr class="comment a" id="review3" style="display: none;"> <th></th> <td colspan="4">상세내용3</td> </tr> <tr> <th>3</th> <td><a href="JavaScript:;" onclick="JavaScript: open_detail('4');">제목4</a></td> <th>작성자4</th> <th>2014.05.15</th> <th>526</th> </tr> <tr class="comment a" id="review4" style="display: none;"> <th></th> <td colspan="4">상세내용4</td> </tr> <tr> <th>2</th> <td><a href="JavaScript:;" onclick="JavaScript: open_detail('5');">제목5</a></td> <th>작성자5</th> <th>2014.05.15</th> <th>526</th> </tr> <tr class="comment a" id="review5" style="display: none;"> <th></th> <td colspan="4">상세내용5</td> </tr> </tbody> </table>
'JavaScript' 카테고리의 다른 글
[JavaScript] 확인 취소 스크립트 (0) | 2014.05.27 |
---|---|
[JavaScript] 모바일 회전 감지 스크립트 (2) | 2014.05.27 |
[JavaScript] id 값의 영역 버튼 클릭시 복사 (0) | 2014.05.09 |
[JavaScript] 이미지 사이즈변경 (리사이징) (0) | 2014.05.09 |
[JavaScript] 마우스 위치에서 레이어 띄우기 (0) | 2014.05.02 |
Comments