added fetch/get/data.json
This commit is contained in:
parent
bd3e947ae0
commit
1266726ce7
12
index.html
12
index.html
@ -0,0 +1,12 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Document</title>
|
||||
<script src="js/script.js" defer> </script>
|
||||
</head>
|
||||
<body>
|
||||
Hello
|
||||
</body>
|
||||
</html>
|
13
js/script.js
13
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')
|
@ -0,0 +1 @@
|
||||
1. Proxy deb 9001<-tcp->9001
|
Loading…
Reference in New Issue
Block a user