<!-- ํ
์ด๋ธ์ด ์๊ณ ์๋์ฒ๋ผ tr์ ๋ฃจํ๋๋ฆฐ๋ค๊ณ ๊ฐ์ -->
<tr th:each="list : ${list}">
<!-- ์๋์ฒ๋ผ th:onclick์์ list์์ ๊ฐ์ ธ์จ empId, annualSno๋ฅผ ์ ๋ฌ -->
<td><a href="#" th:onclick="ViewPop([[${list.empId}]],[[${list.annualSno}]]);" th:text="${list.empNm}"></a></td>
...
</tr>
//์์ธ ํ์
(2๊ฐ์ ๋งค๊ฐ๋ณ์๋ฅผ ๋ฐ์)
function annualViewPop(id, sno) {
const width = 750;
const height = 600;
const left = (window.innerWidth - width) / 2;
const top = (window.innerHeight - height) / 2;
const popWindow = window.open("/viewPop?empId=" + id + "&annualSno=" + sno, "viewPop", "width=" + width + ", height=" + height + ", left=" + left + ", top=" + top);
}
์๋๊ฐ ํต์ฌ
th:onclick="ViewPop([[${list.empId}]],[[${list.annualSno}]]);"
'IT > development' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[mybatis] mybatis oracle merge into (0) | 2023.06.03 |
---|---|
[spring] springBoot ajax json๊ณผ file ์ ์ก (1) | 2023.06.03 |
[springBoot] ๊ณตํด์ผ ์กฐํ API (0) | 2023.05.15 |
[logback] log pattern ์ค์ (2) | 2023.05.14 |
[thymeleaf] if unless ์กฐ๊ฑด (0) | 2023.05.13 |
๋๊ธ