소스 검색

add log test

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

+ 5 - 1
index2.html

@@ -133,7 +133,11 @@
       document.getElementById("mySidenav").style.width = "0";
     }
     function load_data(id){
-      alert(id);
+      var filtered = collection.filter(function (item) {
+        return item.id === id;
+      });
+      alert(filtered.title);
+
     }
     </script>
   <style>