回答編集履歴
1
*
test
CHANGED
@@ -7,3 +7,18 @@
|
|
7
7
|
hikidasi.lastChild.addEventListener('click', function() {
|
8
8
|
```
|
9
9
|
|
10
|
+
または、ループを分ける。
|
11
|
+
|
12
|
+
```js
|
13
|
+
for (var i = 0, l = fileList.length; l > i; i++) {
|
14
|
+
var blobUrl = window.URL.createObjectURL(fileList[i]);
|
15
|
+
document.getElementById('Hikidasi').insertAdjacentHTML(
|
16
|
+
'beforeend', `<img id="${i}" class="Htool" src="${blobUrl}" style="width:5vw">`);
|
17
|
+
}
|
18
|
+
document.querySelectorAll('.Htool').forEach(function(cards) {
|
19
|
+
cards.addEventListener('click', function() {
|
20
|
+
...
|
21
|
+
});
|
22
|
+
});
|
23
|
+
```
|
24
|
+
|