Home >Web Front-end >JS Tutorial >Example of Javascript merging cells with the same content in a table_javascript tips

Example of Javascript merging cells with the same content in a table_javascript tips

WBOY
WBOYOriginal
2016-05-16 17:25:581484browse

Rendering:
Example of Javascript merging cells with the same content in a table_javascript tips
HTML code:

Copy code The code is as follows:





表格相同内容合并


合并前:









































































a 1 2 3 4 5
a 1 2 3 4 6
a 2 3 3 4
b 3 4 6 7
b 3 5 6 7
cc 2 3 4 5
cc 2 3 5 5
d 1 2 3 4
e 1 2 3 4


合并后:










































































a 1 2 3 4 5
a 1 2 3 4 6
a 2 3 3 4
b 3 4 6 7
b 3 5 6 7
cc 2 3 4 5
cc 2 3 5 5
d 1 2 3 4
e 1 2 3 4




JS:
复制代码 代码如下:


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