table

英 [ˈteɪbl]   美 [ˈtebəl]  

n.桌子;表,目录;手术台,工作台,游戏台;平地层

vt.制表;搁置;嵌合;搁置

adj.桌子的

第三人称单数: tables 复数: tables 现在分词: tabling 过去式: tabled

layout

英 [ˈleɪaʊt]   美 [ˈleˌaʊt]  

n.布局,安排,设计;布置图,规划图

复数: layouts

javascript tableLayout属性 语法

作用:用来显示表格单元格、行、列的算法规则。

语法:Object.style.tableLayout=automatic|fixed

javascript tableLayout属性 示例

<html>
<head>
<script type="text/javascript">
function setFixedTableLayout()
{
document.getElementById('myTable').style.tableLayout="fixed";
}
</script>
</head>
<body>

<table id="myTable" border="1" width="100%">
<col width="20%"><col width="40%"><col width="40%">
<tr>
<td>1000000000000000000000000000</td>
<td>10000000</td>
<td>100</td>
</tr>
</table>

<input type="button" onclick="setFixedTableLayout()"
value="Set fixed table layout">

</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例