x
1
2
<html>
3
<head>
4
<meta charset="utf-8">
5
<title>蜜蜂教程(mifengjc.com)</title>
6
<script>
7
function valignCell() {
8
var x = document.getElementById('myTable').rows[0].cells;
9
x[0].vAlign = "bottom";
10
}
11
</script>
12
</head>
13
<body>
14
15
<table id="myTable" border="1">
16
<tr>
17
<td height="50px">第一个单元格</td>
18
<td>第二个单元格</td>
19
</tr>
20
<tr>
21
<td height="50px">第三个单元格</td>
22
<td>第四个单元格</td>
23
</tr>
24
</table>
25
<form>
26
<input type="button" onclick="valignCell()" value="第一个单元格内容底部对齐">
27
</form>
28
29
</body>
30
</html>