瀏覽代碼

add log test

ming 3 年之前
父節點
當前提交
5d64dd5c76
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      index2.html

+ 1 - 3
index2.html

@@ -133,10 +133,8 @@
       document.getElementById("mySidenav").style.width = "0";
     }
     function load_data(id){
-      obj = loaded_data.find(item => item.id === id)
-      console.log(obj)
       var title = document.getElementById("title")
-      title.innerHTML = obj.name;
+      title.innerHTML = loaded_data.find(item => item.id === id).name
       var step;
       for (step = 1; step <= 10; step++) {
         $(".txtsrc"+step).val() = obj.text_content[step-1]