Latest web development tutorials

HTML DOM 그럴 sectionRowIndex 속성

그럴 개체 참조 그럴 객체

정의 및 사용

TsectionRowIndex 속성은 행 TBODY, THEAD, 또는 TFOOT 반환 행의 수집 위치를

문법

위로 sectionRowIndex 속성 :

trObject.sectionRowIndex

팁 : sectionRowIndex 속성은 기본값이 없습니다.


브라우저 지원

Internet ExplorerFirefoxOperaGoogle ChromeSafari

모든 주요 브라우저는 sectionRowIndex 속성을 지원


여기 THEAD, TBODY, TFOOT 행 컬렉션 라인 팝 :

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>本教程(w3big.com)</title>
<script>
function displayResult(x){
    alert("Section row index is: " + x.sectionRowIndex);
}
</script>
</head>
<body>

<table border="1">
    <thead>
        <tr onclick="displayResult(this)">
            <th>单击显示行下标</th>
        </tr>
        <tr onclick="displayResult(this)">
        <th>单击显示行下标</th>
        </tr>
</thead>
<tbody>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
</tbody>
<tfoot>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
        <tr onclick="displayResult(this)">
        <td>单击显示行下标</td>
        </tr>
</tfoot>
</table>

</body>
</html>

»시도


그럴 개체 참조 그럴 객체