1
MayLava 2014-04-11 00:15:56 +08:00
<table>
for row in array2: <tr> for td_val in row: <td>td_val</td> </tr> </table> |
2
MayLava 2014-04-11 00:17:16 +08:00 1
擦不能缩进……
<table> for row in array2: ....<tr> ....for td_val in row: ........<td>td_val</td> ....</tr> </table> |
3
JoyNeop 2014-04-11 00:35:26 +08:00 1
var arr0 = [133, 435, 345, 345, 576, 6543, 462]
var arr1 = [2, 435, 345, 345, 576, 6543, 4674, 1234, 63456, 123, 685, 422] var arr2 = [3, 435, 345, 345, 576, 6543, 63456, 123, 685, 422] var arr3 = [4, 435, 345, 345, 576, 6543, 4674, 1234, 63456, 123, 685, 422] var arr4 = [5, 435, 6543, 4674, 1234, 63456, 123, 685, 422] var arr5 = [6, 435, 345, 6543, 4674, 1234, 682] var arr = [arr0, arr1, arr2, arr3, arr4, arr5] var table = document.createElement("table") for (i = 0; i < arr.length; i++) { var tr = document.createElement("tr") for (j = 0; j < arr[i].length; j++) { var td = document.createElement("td") td.appendChild(document.createTextNode(arr[i][j])) tr.appendChild(td) } table.appendChild(tr) } document.body.appendChild(table) |
4
ETiV 2014-04-11 00:35:53 +08:00 1
|
5
tangyuan OP 感谢大家我先送上谢谢再去研究下各位的方案
|
6
JoyNeop 2014-04-11 01:03:38 +08:00
|
7
JoyNeop 2014-04-11 01:04:17 +08:00
|
8
JoyNeop 2014-04-11 01:08:46 +08:00
|
9
JoyNeop 2014-04-11 01:09:04 +08:00
|
10
JoyNeop 2014-04-11 01:11:23 +08:00
<script src="https://gist.github.com/JoyNeop/10402510.js"></script>
|
12
JoyNeop 2014-04-11 01:12:52 +08:00
|
13
ETiV 2014-04-11 01:14:34 +08:00
|
14
ETiV 2014-04-11 01:15:25 +08:00
|
15
ETiV 2014-04-11 01:16:46 +08:00
莫非帖子内容页里, 只有第一个 gist 可以页面内引用.
其他的只能是以链接形式存在的... |
16
JoyNeop 2014-04-11 01:17:34 +08:00
|
17
JoyNeop 2014-04-11 01:17:54 +08:00
|
18
JoyNeop 2014-04-11 01:31:56 +08:00
|
19
momou 2014-04-11 10:10:50 +08:00
|
21
JoyNeop 2014-04-11 11:36:08 +08:00 via iPad
|
23
lemonlwz 2014-04-11 16:56:48 +08:00
如果在项目中使用的话,建议还是用 template 实现.
规范+简单 |