質問編集履歴

1

2019/06/11 07:38

投稿

tetsu777
tetsu777

スコア39

test CHANGED
File without changes
test CHANGED
@@ -176,10 +176,6 @@
176
176
 
177
177
  var result = document.getElementById("result");
178
178
 
179
- result.id = "aaa";
180
-
181
- aaa.innerHTML = "";
182
-
183
179
  var transaction = db.transaction(["copymystore"], "readwrite");
184
180
 
185
181
  var store = transaction.objectStore("copymystore");
@@ -198,7 +194,7 @@
198
194
 
199
195
  var data = cursor.value;
200
196
 
201
- var d1 = document.getElementById('aaa');
197
+ var d1 = document.getElementById('result');
202
198
 
203
199
  d1.insertAdjacentHTML('afterend', " key:" + cursor.primaryKey +" value:" + cursor.value.copymyvalue + " value2:" + data.copymyvalue2 +" 数値:" + data.price + " 日付:" +data.date +"<a id='" + cursor.primaryKey + "' onclick='deleteValue()' href='#'>[ 削除 ]</a>" + "<a onclick='clickBtn5(" + cursor.value.copymyvalue + " )' href='#'>[ 編集 ]</a>" +"<br>");
204
200
 
@@ -214,13 +210,13 @@
214
210
 
215
211
  function clickBtn5(copymyvalue){
216
212
 
217
- const res = document.getElementById("aaa");
213
+ const res = document.getElementById("result");
218
214
 
219
215
  for (let i=res.childNodes.length-1; i>=0; i--) {res.removeChild(res.childNodes[i]);
220
216
 
221
217
  }
222
218
 
223
- var obj = document.getElementById("aaa");
219
+ var obj = document.getElementById("result");
224
220
 
225
221
  obj.id = "bbb";
226
222