浏览代码

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