728x90
1. ์ถ๊ฐํ๊ธฐ .innerHTML
๋ถ๋ชจ์ฐฝ html ๋ถ๋ถ
<table>
<thead>
<tr>
<th>๊ตฌ๋ถ</th>
<th>์์น</th>
<th>์ฅ์น๋ช
</th>
</tr>
</thead>
<tbody id="senInsertList">
</tbody>
</table>
์์์ฐฝ js ๋ถ๋ถ
var senList = '';
senList += '<tr class="senListTr'+num+'">';
senList += '<td class="typeText'+num+'">'+ sensorTypeText +'</td>';
senList += '<td class="senCodeDetlNm'+num+'">'+ codeDetlNm +'</td>';
senList += '<td class="resultInput'+num+'">'+ resultInput +'</td>';
senList += '</tr>';
parent.document.getElementById("senInsertList").innerHTML += senList;
2. ์ญ์ ํ๊ธฐ .remove();
parent.document.getElementsByClassName("sensorListTr"+num).item(0).remove();
'js' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[javaScript] input ๊ฐ ์ซ์๊ฐ ์๋๊ฒฝ์ฐ ์ง์ฐ๊ธฐ (0) | 2021.03.22 |
---|---|
[jQuery] ํผ์น๊ธฐ ์ ๊ธฐ (0) | 2021.03.15 |
[javaScript] this ์ธ์ ์ ๋ฌ onclick vs href (0) | 2021.02.21 |
[AJAX] arrayList null check (0) | 2021.02.21 |
[JSTL] fn:contains (0) | 2021.02.18 |