案例:javascript案例     状态:可编辑再运行    进入横版
x
<input type="button" onclick="rowRules()" value="仅显示行边框">
 
1
<html>
2
<head>
3
<script type="text/javascript">
4
function rowRules()
5
  {
6
  document.getElementById('myTable').rules="rows"
7
  }
8
function colRules()
9
  {
10
document.getElementById('myTable').rules="cols"
11
  }
12
</script>
13
</head>
14
15
<body>
16
<table id="myTable" border="1">
17
<tr>
18
<td>Row1 cell1</td>
19
<td>Row1 cell2</td>
20
</tr>
21
<tr>
22
<td>Row2 cell1</td>
23
<td>Row2 cell2</td>
24
</tr>

 运行结果 
 北美留学生论坛