What is exactly Dom and Dom manipulation in a snap

Search for a command to run...

No comments yet. Be the first to comment.
Hi, Hope you are doing fine... Gaurav This side, I hope everything is fine, on your side, and if it is not fine, don't worry it would be : ) This article is regarding AnonMsg which you to give and take Anonymous feedback from anyone. Feedback has al...

Welcome to JavaScript baazi a blog series where we go through common interview questions in JavaScript and understand everything around them. Firstly What is Promise.all() ? So... Promise.all() take an array of promises as input and then return a pro...

In this blog, we are going to build a QR code scanner and generator in Next.js. QR codes are currently powering everything in the world. from payments to id cards, everything has a QR code on it. Here in this small demo we will be building a small de...

Welcome to JavaScript baazi a blog series where we go through common interview questions in JavaScript and understand everything around them. Hmm... So what is the flattening of an array? basically in flattening we reduce the dimension of an array.ba...

Hello 👋 Gaurav This side, I hope everything is fine, on your side, and if it is not fine, don't worry it would be : ) This article is regarding MeowForms which allows you to build custom back endless for free. I have made my small side projects in ...

In this article, we will go through the dom and dom manipulation.
DOM (document object model ) is basically a programming API for HTML and XML documents, with dom you can specify how your document should be structured. with dom, we can easily manipulate the elements of our document.

According to the dom model, every element is an object, and even the nested tags are the objects and chile of the enclosing one. HTML dome basically looks like a tree. it is also called a tree.

open the console of your browser right now. press ctrl + shift + j enter this in the console of your browser.
console.log(document);
what do you get? you will get the entire HTML document returned. here the document object represents the entire web page.
if we want to access any element in the web page we need to start accessing that with the help of the document object.
for example, if you want to get the domain of the page ... just type
console.log(document.domain)
well, there are many many ways to do that... you can use query selectors, getElement by class, or id
document.querySelector(".myclass");
var x = document.querySelectorAll(".myclasses");
// if I want to change the background...
x.style.backgroundColor = "dark" ;
this is how you can easily manipulate dom.
This is just a beginner article of my javascript series. where I would be sharing everything I am learning to prepare for interviews. positive or negative please leave your feedback.
you can connect with me on Twitter
you can support me on. buymeacoffe