Home > Web Front-end > JS Tutorial > javascript method to add colspanrowspan parameter to dynamic table_javascript skills

javascript method to add colspanrowspan parameter to dynamic table_javascript skills

WBOY
Release: 2016-05-16 18:49:24
Original
1697 people have browsed it

Solution: Obtain the table object and obtain an element under the corresponding row object below it. Here, for example, document.tableId.rows[i].cells[j] obtains the j-th element under the i-th row under the table. Then document.tableId.rows[i].cells[j].colspan=n.
eg:
dempTHFirst is the element to which row or column attributes are to be added.

demoThFirst.colSpan=3;

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template