質問編集履歴
1
コードの修正
title
CHANGED
|
File without changes
|
body
CHANGED
|
@@ -13,29 +13,52 @@
|
|
|
13
13
|
|
|
14
14
|
HTMLのtable部分
|
|
15
15
|
```ここに言語を入力
|
|
16
|
-
<table
|
|
17
|
-
class="sample"
|
|
18
|
-
|
|
16
|
+
<table class="sample" style="margin-top: 50px">
|
|
19
|
-
|
|
17
|
+
<thead>
|
|
20
|
-
|
|
18
|
+
<tr>
|
|
21
|
-
|
|
19
|
+
<th></th>
|
|
22
|
-
|
|
20
|
+
<th>タイトル</th>
|
|
23
|
-
|
|
21
|
+
<th>日時</th>
|
|
24
|
-
|
|
22
|
+
</tr>
|
|
25
|
-
|
|
23
|
+
</thead>
|
|
26
|
-
|
|
24
|
+
<tbody>
|
|
27
|
-
|
|
25
|
+
<tr>
|
|
28
|
-
<td><input type="radio" name="check" value="check"></td>
|
|
29
|
-
|
|
26
|
+
<td>a</td>
|
|
30
|
-
|
|
27
|
+
<td>b</td>
|
|
31
|
-
|
|
28
|
+
</tr>
|
|
29
|
+
|
|
30
|
+
</tbody>
|
|
31
|
+
</table>
|
|
32
|
+
|
|
33
|
+
<table class="sample" style="margin-top: 50px">
|
|
34
|
+
<thead>
|
|
32
|
-
|
|
35
|
+
<tr>
|
|
33
|
-
<td><input type="radio" name="check" value="check"></td>
|
|
34
|
-
|
|
36
|
+
<th></th>
|
|
37
|
+
<th>タイトル</th>
|
|
35
|
-
|
|
38
|
+
<th>日時</th>
|
|
36
|
-
|
|
39
|
+
</tr>
|
|
40
|
+
</thead>
|
|
41
|
+
<tbody id="tbody">
|
|
42
|
+
|
|
37
|
-
|
|
43
|
+
</tbody>
|
|
38
|
-
|
|
44
|
+
</table>
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
<script
|
|
50
|
+
src="C:\Json_table表示用\mnt\field\remote\aaaaa\config\instance_def.json">
|
|
51
|
+
//与えられたタグ名を持つ要素のリストを返す。
|
|
52
|
+
var trs = document.getElementsByTagId('tbody');
|
|
53
|
+
|
|
54
|
+
for (var i = 0, length = JSON_DATA.length; i < length; i++) {
|
|
55
|
+
var data = JSON_DATA[i], tr = trs[i], tds = tr
|
|
56
|
+
.getElementsByTagName('td');
|
|
57
|
+
|
|
58
|
+
td[1].innerText = data.file_name;
|
|
59
|
+
td[2].innerText = data.update_name;
|
|
60
|
+
}
|
|
61
|
+
</script>
|
|
39
62
|
```
|
|
40
63
|
|
|
41
64
|
Json
|