-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathscript5.js
30 lines (25 loc) · 908 Bytes
/
script5.js
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
// const p3 = document.querySelector(".p3");
// function ubahWarnaP2() {
// p2.style.backgroundColor = "lightblue";
// }
// function ubahWarnaP3() {
// p3.style.backgroundColor = "lightblue";
// }
// const p2 = document.querySelector(".p2");
// p2.onclick = ubahWarnaP2;
// const p4 = document.querySelector("section#b p");
// p4.addEventListener("click", function () {
// const ul = document.querySelector("section#b ul");
// const liBaru = document.createElement("li");
// const liTeksBaru = document.createTextNode("item baru");
// liBaru.appendChild(liTeksBaru);
// ul.appendChild(liBaru);
// });
const p3 = document.querySelector(".p3");
// p3.addEventListener("mouseenter", function () {
// p3.style.backgroundColor = "lightblue";
// });
// p3.addEventListener("mouseleave", function () {
// p3.style.backgroundColor = "red";
// });
p3.addEventListener("click", function () {});