微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

table表格动态合并将table表格转换成json格式

<table class="javascript"><tr class="li1">
<td class="ln"><pre class="de1">1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187

DOCTYPE html html           head                 Meta charset                 titletitle                 style                         table                                 fontfamily 黑体                                 fontsize 14pt                                 bordercolor rgb                                 bordercollapse collapse                                 backgroundcolor white                                 borderwidth 1px                                 aligncontent center                                                                         td                                 width 100px                                 height 32px                                 textalign center                                 bordercolor rgb                                 border gray 1px solid                                 fontsize 15px                                 color black                                                                         #tabTh                                 backgroundcolor rgb                                 bordercolor rgb                                 color white                                 fontsize 16px                                 height 38px                                                                         #btnSum                                 margin 0px 1px 10px 0px                                                                         #btnRes                                 margin 0px 1px 10px 525px                                         style         head           body                 script                         添加合计行;                                                   jsonStr                                                   jsonObj JSON.jsonStr                         console.jsonObj                                                   aArr                         arr                         i jsonObj.                                 aArr.i                                                 i i jsonObj.. i                                 arri                                 j j aArr. j                                         arrij jsonObj.iaArrj                                                                                 arr.aArr                         console.arr                                                   table document.                         table.                           thead document.                         i i arr. i                                 th document.                                 th.                                 th. arri                                 thead.th                                                 table.thead                           i i arr. i                                 tr document.                                 j j arri. j                                         cell document.                                         cell.                                         cell. arrij                                         tr.cell                                                                 table.tr                                                 document..table                                                   checkArrayarr1 arr2                                 i i arr1. i                                         arr1i. arr2i.                                                                                                                                                                                                                                                     window.                                 tb document.                                 obj1                                 obj2                                 objtemp1                                 objtemp2                                 rowCount tb..                                 colCount tb...                                 colLength                                                                   i i rowCount i                                         j j colCount j                                                 tb.i.j. i. j.                                                                                                                                           col colLength col = col                                         0时有前方的单元格                                         col                                                                                                 l l col l                                                         objtemp1l document. l.                                                                                                                                 obj1 document. col.                                                                                   row row rowCount row                                                 0:即有前方单元格,此时有objtemp2                                                 col                                                         l l col l                                                                 objtemp2l document. row. l.                                                                                                                                                         obj2 document. row. col.                                                                                                                                                   obj1. obj2.                                                         0(此步判断为单元格合并的依赖性提供支持)                                                         col                                                                                                                                 checkArrayobjtemp1 objtemp2                                                                         obj1.                                                                         obj2..obj2                                                                                                                                                                                                                                                                         obj1 document. row. col.                                                                         l l col l                                                                                 objtemp1l document. row. l.                                                                                                                                                                                                                                                                                                                                                                                 obj1.                                                                 obj2..obj2                                                                                                                                                                                                                                                                 obj1 document. row. col.                                                         l l col l                                                                 objtemp1l document. row. l.                                                                                                                                                                                         objtemp1                                         objtemp2                                                                         script         body   html  

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。

相关推荐