HTML DOM Table 객체

1476 단어
컬렉션
묘사
IE
F
O
W3C
cells[]
표의 모든 칸을 포함하는 그룹을 되돌려줍니다.
5
1
1
No
rows[]
표의 모든 줄을 포함하는 그룹을 되돌려줍니다.
4
1
9
Yes
tBodies[]
표의 모든 tbody를 포함하는 그룹을 되돌려줍니다.
4
 
 
Yes


<html> 


<head> 


<script type="text/javascript"> 


function cell()
  { 


 var x=document.getElementByIdx_x('myTable').rows[0].cells; 


 alert(x[0].innerHTML); 


 }
</script> 


</head> 


<body> 


<table id="myTable" border="1"> 


<tr> 


<td>cell 1</td> 


<td>cell 2</td> 


</tr> 


<tr> 


<td>cell 3</td> 


<td>cell 4</td> 


</tr> 


</table> 


<br /> 


<input type="button" onclick="cell()" value="Alert first cell">

</body>
</html>

좋은 웹페이지 즐겨찾기