scrimba
Bootcamp (HTML/CSS/JS) 2024
Bootcamp #9.4
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Bootcamp #9.4
AboutCommentsNotes
Bootcamp #9.4
Expand for more info
index.js
run
preview
console
// javascript
const divNodes = document.querySelectorAll("#div-class");
divNodes.childNodes

const nodes = document.getElementsByTagName("p")
console.log(nodes.length);
for(let i = 0; i < nodes.length ; i++) {
nodes[i].style.color = 'red';
nodes[i].style.backgroundColor = 'black';
}
/*
const node = document.getElementById("label");
const inputNode = document.getElementById("fname");
inputNode.onclick = function(){

}
function changeinput1(){
console.log("Knock");
}
function changeinput2(){
console.log("Knock");
}
function changeinput3(){
console.log("Knock");
}
inputNode.addEventListener("input", changeinput1);
inputNode.addEventListener("input", changeinput2);
inputNode.addEventListener("input", changeinput3);

inputNode.removeEventListener("input", changeinput1)

node.onclick = function(){
node.innerHTML = "i am chnaging";
}

function checkCookies(){

}

node.addEventListener("click", function(){
node.innerHTML = "i am chnaging---";
})

node.addEventListener("mousemove", function(){
node.style.backgroundColor = '#ccc';
})
node.addEventListener("mouseleave", function(){
node.style.backgroundColor = '#fff';
})

*/
Console
3
,
/index.html
LIVE