-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcheck.html
More file actions
84 lines (68 loc) · 3.17 KB
/
Copy pathcheck.html
File metadata and controls
84 lines (68 loc) · 3.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<p id="availablespace"></p>
<!-- <style>#dexscreener-embed{position:relative;width:100%;padding-bottom:125%;}@media(min-width:1400px){#dexscreener-embed{padding-bottom:65%;}}#dexscreener-embed iframe{position:absolute;width:100%;height:100%;top:0;left:0;border:0;}</style>
<div id="dexscreener-embed"><iframe src=""></iframe></div> -->
<!-- // fetching data from an api -->
<ul id="list"></ul>
<!-- <button onclick="seeAvailableSpace()">See Space</button> -->
<script>
var list = document.getElementById('list');
function seeAvailableSpace() {
var http = new XMLHttpRequest();
http.onreadystatechange = function () {
if (this.readyState === 4){
if(this.status === 200){
var response = JSON.parse(this.responseText);
console.log(response)
for(var i = 0; i < response.length; i++){
// document.getElementById("availablespace").innerHTML += response[i].name;
console.log(response[i].name)
list.appendChild(getOpenPlace(response[i].name));
function getOpenPlace(name, id){
var newListElement = document.createElement('li');
var textNode = document.createTextNode(name);
newListElement.appendChild(textNode);
return newListElement;
}
}
}
else{
console.log("call failed")
}
}
}
http.open('GET', 'http://workspace-api3342.herokuapp.com/booked_days/', true);
http.send();
}
seeAvailableSpace()
// https://jsonplaceholder.typicode.com/todos
</script>
<!-- <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js" integrity="sha512-894YE6QWD5I59HgZOGReFYm4dnWc1Qt5NtvYSaNcOP+u1T9qYdvdihz0PPSiiqn/+/3e7Jo4EaG7TubfWGUrMQ==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script>
function getTheCoin(){
var url = "0xf0f9d895aca5c8678f706fb8216fa22957685a13"
$("iframe").attr("src", 'https://dexscreener.com/ethereum/' + url + '?embed=1&theme=dark&info=0')
}
getTheCoin()
// 0x35bA8966aa3D81E007d2CBC167172583a07dFf8C
async function getData(){
const response= await fetch('https://jsonplaceholder.typicode.com/todos')
console.log(response);
const data= await response.json();
console.log(data);
for(var i = 0; i < data.length; i++)
console.log(data[i])
document.getElementById("availablespace").innerHTML = data[i].title
}
getData();
</script> -->
</body>
</html>