일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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
- PLSQL
- Google Map
- Spring
- rowspan
- MFC
- PHP
- tomcat
- jQuery
- GPS
- Struts
- JSON
- MySQL
- jsr 296
- 선택적조인
- 전자정부프레임워크
- sencha touch
- ibsheet
- swingx
- appspresso
- Android
- phonegap
- WebLogic
- 가우스
- Ajax
- dock
- oracle
- Eclipse
- node.js
- iBATIS
- JDOM
Archives
- Today
- Total
Where The Streets Have No Name
table의 행,열,td안의 텍스트 알아내기 본문
<script>
function window.onload() {
//행의 개수
alert("table row count : " + document.getElementById("tbl").rows.length);
//열의 개수
alert("table cell count : " + document.getElementById("tbl").rows[0].cells.length);
//td안의 값
alert("table cell value : " + document.getElementById("tbl").rows[0].cells[0].innerText);
}
</script>
<table id="tbl">
<tr>
<td>1:sdsds</td>
<td>2:asaa</td>
</tr>
</table>
function window.onload() {
//행의 개수
alert("table row count : " + document.getElementById("tbl").rows.length);
//열의 개수
alert("table cell count : " + document.getElementById("tbl").rows[0].cells.length);
//td안의 값
alert("table cell value : " + document.getElementById("tbl").rows[0].cells[0].innerText);
}
</script>
<table id="tbl">
<tr>
<td>1:sdsds</td>
<td>2:asaa</td>
</tr>
</table>