티스토리 뷰
jquery 모달 modal 띄우고 닫기
<button type="button" id="btnOpen">모달오픈</button>
<div id="popupModal">
<table class="" id="tempList">
<colgroup>
<col width="">
<col width="">
<col width="">
</colgroup>
<thead>
<tr>
<th class="">컬럼헤더0</th>
<th class="">컬럼헤더1</th>
</tr>
</thead>
<tbody>
<tr>
<td>컬럼0</td>
<td>컬럼1</td>
</tr>
</tbody>
</table>
<div class="footer">
<a href="#" id="btnClose" data-dismiss="modal"><spring:message code='system.close'/></a>
</div>
</div>
//모달 띄우기
$("#btnOpen").click(function(){
$("#popupModal").modal('show');
});
//테이블 row를 클릭했을때 값을 처리하고 modal를 닫는다.
$("#tempList tbody").on("click", "tr", function(){
alert( $(this).find("td:eq(0)").text() );
$("#btnClose").trigger('click');
});
여기서 <spring:message code='system.close'/> 는 메세지 프로퍼티 파일의 내용입니다.
즉, /WEB-INF/messages 폴더에 파일이 존재합니다. 위치는 설정파일에서 변경할 수 있습니다.
/WEB-INF/messages/message.properties 파일을 열어보면
system.close=닫기
이렇게 되어 있습니다.
'jquery' 카테고리의 다른 글
html focus (0) | 2019.02.09 |
---|---|
jquery select (drop down list) option 검색 - jquery chosen (0) | 2018.10.26 |
[jQuery] td:eq(index) 테이블 선택 데이터 정보 가져오기 (0) | 2018.10.11 |
jquery serialize (0) | 2018.10.01 |
jquery masonry (0) | 2017.12.28 |
- Total
- Today
- Yesterday
- proc
- ocajp
- 스크래핑
- XE
- MySQL
- 이클립스
- 자바
- xe addon
- 자바 smtp
- 라이믹스 모듈
- xe애드온
- webix
- ocjap
- 문자열
- EC
- 인포믹스
- C언어
- C
- 파이썬
- esql
- 프로씨
- 플러터
- Python
- XE3
- php
- KG
- 파싱
- 오라클
- 포인터
- JDBC
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |