소스 검색

add log test

ming 3 년 전
부모
커밋
abbe7bac49
1개의 변경된 파일4개의 추가작업 그리고 3개의 파일을 삭제
  1. 4 3
      index2.html

+ 4 - 3
index2.html

@@ -135,14 +135,15 @@
     function load_data(id){
     function load_data(id){
       var title = document.getElementById("title")
       var title = document.getElementById("title")
       console.log(id)
       console.log(id)
-      title.innerHTML = loaded_data.find(item => item.id === 4).name
+      tid = 4
+      title.innerHTML = loaded_data.find(item => item.id === tid).name
       var step;
       var step;
       for (step = 1; step <= 10; step++) {
       for (step = 1; step <= 10; step++) {
-        $(".txtsrc"+step).val(loaded_data.find(item => item.id === 4).text_content[step-1]) 
+        $(".txtsrc"+step).val(loaded_data.find(item => item.id === tid).text_content[step-1]) 
       }
       }
       var step2;
       var step2;
       for (step2 = 1; step2 <= 10; step2++) {
       for (step2 = 1; step2 <= 10; step2++) {
-        $(".imgsrc"+step2).val(loaded_data.find(item => item.id === 4).image_urls[step-1]) 
+        $(".imgsrc"+step2).val(loaded_data.find(item => item.id === tid).image_urls[step-1]) 
       }
       }
       
       
     }
     }