<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<title></title>
<script type="text/javascript">
function rowRules() {
document.getElementById('myTable').rules = "rows"
}
function colRules() {
document.getElementById('myTable').rules = "cols"
}
function groups() {
document.getElementById('myTable').rules = "groups"
}
function all() {
document.getElementById('myTable').rules = "all"
}
function none2() {
document.getElementById('myTable').rules = "none"
}
</script>
</head>
<body>
<table id="myTable" border="1">
<tr>
<td>
Row1 cell1
</td>
<td>
Row1 cell2
</td>
</tr>
<tr>
<td>
Row2 cell1
</td>
<td>
Row2 cell2
</td>
</tr>
<tr>
<td>
Row3 cell1
</td>
<td>
Row3 cell2
</td>
</tr>
</table>
<br />
<input type="button" onclick="rowRules()" value="Show only row borders" /><br />
<input type="button" onclick="colRules()" value="Show only col borders" /><br />
<input type="button" onclick="groups()" value="Show only col groups" /><br />
<input type="button" onclick="all()" value="Show only col all" /><br />
<input type="button" onclick="none2()" value="Show only col none" /><br />
</body>
</html>
Table 的 rules规则
最新推荐文章于 2022-08-31 16:26:36 发布