-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathinsert-html.js
More file actions
45 lines (29 loc) · 972 Bytes
/
insert-html.js
File metadata and controls
45 lines (29 loc) · 972 Bytes
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
let dabba = document.getElementById("ele1");
dabba.innerHTML += "<h>Our beta kaise ho?!</h>"
// console.log(dabba.outerHTML)
let somet = document.getElementsByClassName("s1head")[0]
somet.onclick = () => {
somet.innerHTML = prompt("Kya khna chahte h aap?")
}
// somet.onmouseenter = () => {
// somet.innerHTML = `Hello ${prompt()}!`
// }
let some2 = document.getElementsByClassName("s1head")[1]
let x = function(event){
some2.style.background = prompt("Suggest me background color")
console.log("here i come")
}
let y = function(event){
some2.style.color = prompt("Suggest me text's color.")
console.log("here i come")
}
some2.onclick = x
some2.onclick = y
// some2.addEventListener('click',x)
// some2.addEventListener('click',y)
// some2.removeEventListener('click', x)
// some2.removeEventListener('click', y)
function off_bulb () {
document.getElementById("bulbup").classList.toggle("yelloww");
}
setInterval(off_bulb, 500);