回答編集履歴
1
追記
test
CHANGED
@@ -5,8 +5,6 @@
|
|
5
5
|
|
6
6
|
|
7
7
|
```javascript
|
8
|
-
|
9
|
-
<script>
|
10
8
|
|
11
9
|
window.onload=function(){
|
12
10
|
|
@@ -40,8 +38,54 @@
|
|
40
38
|
|
41
39
|
}
|
42
40
|
|
41
|
+
```
|
42
|
+
|
43
|
-
|
43
|
+
```HTML
|
44
44
|
|
45
45
|
<input type="button" id="btn" value="check">
|
46
46
|
|
47
47
|
```
|
48
|
+
|
49
|
+
|
50
|
+
|
51
|
+
# 追記
|
52
|
+
|
53
|
+
よくみるとjQueryっぽいので、こうでしょうか?
|
54
|
+
|
55
|
+
```javascript
|
56
|
+
|
57
|
+
$(function(){
|
58
|
+
|
59
|
+
var data = `
|
60
|
+
|
61
|
+
<div class='test'>
|
62
|
+
|
63
|
+
<div>hoge</div>
|
64
|
+
|
65
|
+
<div>hoge</div>
|
66
|
+
|
67
|
+
<div>hoge</div>
|
68
|
+
|
69
|
+
<div>hoge</div>
|
70
|
+
|
71
|
+
<div>hoge</div>
|
72
|
+
|
73
|
+
<div>hoge</div>
|
74
|
+
|
75
|
+
<div>hoge</div>
|
76
|
+
|
77
|
+
<div>hoge</div>
|
78
|
+
|
79
|
+
</div>`;
|
80
|
+
|
81
|
+
$("#btn").on('click',function(){
|
82
|
+
|
83
|
+
$("body").append($(data));
|
84
|
+
|
85
|
+
});
|
86
|
+
|
87
|
+
});
|
88
|
+
|
89
|
+
```
|
90
|
+
|
91
|
+
|