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

javascript method to add colspanrowspan parameter to dynamic table_javascript skills

WBOY
WBOYOriginal
2016-05-16 18:49:241654browse

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;

Statement:
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