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