中文字幕一区二区人妻电影,亚洲av无码一区二区乱子伦as ,亚洲精品无码永久在线观看,亚洲成aⅴ人片久青草影院按摩,亚洲黑人巨大videos

td/th axis 屬性

td/th 對(duì)象參考手冊(cè) td/th 對(duì)象

定義和用法

axis 屬性可設(shè)置或返回一個(gè)由逗號(hào)分隔的列表,其中包含了一組類型(有關(guān)聯(lián)的單元格)的名稱。

語法

設(shè)置 axis 屬性:

tdObject.axis="text"

或者

thObject.axis="text"

返回 axis 屬性:

tdObject.axis

或者

thObject.axis

提示:axis屬性沒有默認(rèn)值。


瀏覽器支持

Internet ExplorerFirefoxOperaGoogle ChromeSafari

所有主流瀏覽器都支持 axis 屬性。


實(shí)例

實(shí)例

下面的例子可返回單元格的 axis:

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>小白教程(json.cn)</title>
<script>
function displayResult(){
????var x=document.getElementById("myTable");
????var th=x.getElementsByTagName("th");
????for (var i=0;i<th.length;i++){
????????alert ("The " + (i+1) + ". column axis is: " + th[i].axis);
????}
}
</script>
</head>

<body>
<table border="1" id="myTable">
????<tr>
????????<th axis="car">名稱</th>
????????<th axis="country">國家</th>
????</tr>
????<tr>
????????<td>BMW</td>
????????<td>Germany</td>
????</tr>
????<tr>
????????<td>Volvo</td>
????????<td>Sweden</td>
????</tr>
????<tr>
???? <td>Saab</td>
???? <td>Sweden</td>
????</tr>
</table>
<br>
<button type="button" onclick="displayResult()">獲取Axis</button>

</body>
</html>

運(yùn)行代碼 ?

td/th 對(duì)象參考手冊(cè) td/th 對(duì)象其他擴(kuò)展