-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathscript.js
More file actions
42 lines (38 loc) · 1.22 KB
/
script.js
File metadata and controls
42 lines (38 loc) · 1.22 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
const url = "https://joke110.p.rapidapi.com/random_joke";
const options = {
method: "GET",
headers: {
"X-RapidAPI-Key": "apikey",
"X-RapidAPI-Host": "joke110.p.rapidapi.com",
},
};
var i=0;
const f = async () => {
const response = await fetch(url, options);
const result = await response.json();
type.innerHTML = result.type;
setup.innerHTML = result.setup;
punchline.innerHTML = result.punchline;
i++;
total.innerHTML=i;
// id.innerHTML=result.id;
};
f();
document.getElementById("btn").addEventListener("click",f);
document.getElementById("a1").addEventListener("click",()=>
{
document.getElementById("maja").innerHTML=`ispe kam chal raha hai . <br><br>
Jaldi hi update hojayega ji !!!! 😄`
document.getElementById("custoo").style.visibility="hidden"
})
document.getElementById("a2").addEventListener("click",()=>
{
document.getElementById("maja").innerHTML=`isme bhiii . <br><br>
Jaldi hi update hojayega ji !!!! 😄`
document.getElementById("custoo").style.visibility="hidden"
})
document.getElementById("s1").addEventListener("click",()=>
{
document.getElementById("maja").innerHTML=`😄 sorry`
document.getElementById("custoo").style.visibility="hidden"
})