HTML DOM TableData ColSpan Property - W3Schools
Có thể bạn quan tâm
❮ TableData Object
Example
Change the number of columns a table cell should span:
document.getElementById("myTd").colSpan = "1"; Try it Yourself »Description
The colSpan property sets or returns the value of the colspan attribute.
The colspan attribute specifies the number of columns a table cell should span.
Tip: Use the rowSpan property to set or return the value of the rowspan attribute.
Browser Support
Property | |||||
---|---|---|---|---|---|
colSpan | Yes | Yes | Yes | Yes | Yes |
Syntax
Return the colSpan property:
tabledataObject.colSpanSet the colSpan property:
tabledataObject.colSpan = numberProperty Values
Value | Description |
---|---|
number | Specifies the number of columns a cell should span |
Technical Details
Return Value: | A Number, representing the number of columns a table cell should span |
---|
More Examples
Example
Return the number of columns a specific table cell should span:
var x = document.getElementById("myTd").colSpan; Try it Yourself »Related Pages
HTML reference: HTML <td> colspan attribute
❮ TableData Object ★ +1 Track your progress - it's free! Log in Sign UpTừ khóa » Html Colspan Javascript
-
HTML Td Colspan Attribute - W3Schools
-
ColSpan Property (td, Th) JavaScript - Dottoro Web Reference
-
Set Colspan/rowspan For A Cell - Javascript - Stack Overflow
-
Javascript Reference - HTML DOM TableData ColSpan Property
-
Javascript DOM TableData Get And Set Column Span Property
-
Table Rowspan And Colspan In HTML Explained (With Examples) »
-
HTML Colspan Attribute - HTML Tutorials - W3resource
-
iaColSpan - Web APIs | MDN
-
HTML Colspan Attribute
-
The Table Element - HTML: HyperText Markup Language | MDN
-
HTML | DOM TableData ColSpan Property - GeeksforGeeks
-
HTML DOM TableHeader ColSpan Property - GeeksforGeeks
-
HTML Th Colspan Attribute - W3Schools
-
How To Change Colspan=“6” To Colspan =“4” In TD Using JQuery ...