Sets or retrieves the number of columns in the group.
dhtml语法
HTML | <ELEMENT SPAN
= iSpan... >
|
---|
Scripting | object.span [ = iSpan ] |
---|
DHTML可能的值
iSpan | Integer that
specifies or receives the number of spanned columns. The default value is 1. |
The property is read/write.
The property has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
remarks
the span property is ignored when set on the colgroup element and colgroup contains one or more col elements. the span property provides a more convenient way of grouping columns without having to specify col objects.
DHTML代码范例
This example sets the SPAN attribute of the col object to two, which causes the col to span two columns. The text is right-aligned in these two columns.
<TABLE BORDER>
<COLGROUP>
<COL SPAN=2 ALIGN=RIGHT>
<COL ALIGN=LEFT>
<TBODY>
<TR>
<TD>This is the first column in the group, and it is
right-aligned.</TD>
<TD>This is the second column in the group, and it is
right-aligned.</TD>
<TD>This is the third column in the group, and it is
left-aligned.</TD>
</TR>
</TABLE>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
是否符合公共标准
This property is defined in
HTML 4.0 and
is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1 .
Applies To