일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
Tags
- ibsheet
- swingx
- rowspan
- phonegap
- PHP
- Google Map
- Ajax
- Eclipse
- 선택적조인
- jQuery
- tomcat
- JDOM
- Spring
- 가우스
- node.js
- sencha touch
- Struts
- WebLogic
- oracle
- jsr 296
- dock
- PLSQL
- JSON
- iBATIS
- MFC
- 전자정부프레임워크
- GPS
- MySQL
- appspresso
- Android
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>