案例:javascript案例     状态:可编辑再运行    进入横版
x
 
1
<!DOCTYPE html>
2
<html>
3
<head>
4
<style>
5
table,th,td
6
{
7
border:1px solid black;
8
}
9
</style>
10
</head>
11
<body>
12
13
<h3>关于如何访问 COLGROUP 元素的一个演示</h3>
14
15
<table>
16
  <colgroup id="myColgroup" span="2" style="background:red"></colgroup>
17
  <tr>
18
    <th>ISBN</th>
19
    <th>Title</th>
20
    <th>Price</th>
21
  </tr>
22
  <tr>
23
    <td>3476896</td>
24
    <td>My first HTML</td>

 运行结果 
 北美留学生论坛