案例:javascript案例     状态:可编辑再运行    进入竖版
 运行结果 
x
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function setFixedTableLayout()
5
{
6
document.getElementById('myTable').style.tableLayout="fixed";
7
}
8
</script>
9
</head>
10
<body>
11
12
<table id="myTable" border="1" width="100%">
13
<col width="20%"><col width="40%"><col width="40%">
14
<tr>
15
<td>1000000000000000000000000000</td>
16
<td>10000000</td>
17
<td>100</td>
18
</tr>
19
</table>
20
21
<input type="button" onclick="setFixedTableLayout()" value="Set fixed table layout">
22
23
</body>
24
</html>
25