From 1266726ce7613ad809d49acab929735f9722ac7f Mon Sep 17 00:00:00 2001 From: bmiast Date: Tue, 15 Apr 2025 07:34:21 +0000 Subject: [PATCH] added fetch/get/data.json --- index.html | 12 ++++++++++++ js/script.js | 13 +++++++++++++ todo/todo.txt | 1 + 3 files changed, 26 insertions(+) diff --git a/index.html b/index.html index e69de29..4c60ce8 100644 --- a/index.html +++ b/index.html @@ -0,0 +1,12 @@ + + + + + + Document + + + + Hello + + diff --git a/js/script.js b/js/script.js index e69de29..0451c52 100644 --- a/js/script.js +++ b/js/script.js @@ -0,0 +1,13 @@ +function get (url) { + + return fetch (url) + .then ( (res) => { + retun res.json() + }) + .then (data => { + + console.log("ok"); + }) +} + +get ('data/data.json') diff --git a/todo/todo.txt b/todo/todo.txt index e69de29..57ac3e7 100644 --- a/todo/todo.txt +++ b/todo/todo.txt @@ -0,0 +1 @@ +1. Proxy deb 9001<-tcp->9001