HTML Element Selectors In JavaScript | JavaScript Tutorial In Hindi #14
Вставка
- Опубліковано 11 жов 2024
- ►JavaScript Tutorial For Beginners In Hindi Playlist - • JavaScript Tutorials I...
►Source Code + Other Material - codewithharry....
This video is a part of my JavaScript In Hindi Course. JavaScript is a high-level, interpreted programming language that conforms to the ECMAScript specification. JavaScript has dynamic typing, prototype-based object-orientation, and first-class functions.
Alongside HTML and CSS, JavaScript is one of the best and most demanded technologies of the World Wide Web. JavaScript enables interactive web pages and is a crucial part of web applications. The vast majority of sites use it, and major web browsers have a dedicated JavaScript engine in order to execute it.
As a multi-paradigm language, it supports event-driven, functional, and imperative programming fashion. It has APIs for dealing with text, arrays, regular expressions, and the DOM, but the language itself does not include any I/O, such as networking, storage, or graphics facilities. It relies upon the host machine environment in which it is embedded to provide these features.
►Click here to subscribe - / @codewithharry
Best Hindi Videos For Learning Programming:
►Learn Python In One Video - • Learn Python In Hindi ...
►Learn JavaScript in One Video - • JavaScript Tutorial
►Learn PHP In One Video - • Learn Php In One Video...
►Machine Learning Using Python - • Machine Learning Tutor...
►Creating & Hosting A Website (Tech Blog) Using Python - • [Hindi] Web Developmen...
►Advanced Python Tutorials - • Intermediate/Advanced ...
►Object Oriented Programming In Python - • Object Oriented Progra...
►Python Data Science and Big Data Tutorials - • Python Data Science an...
Follow Me On Social Media
►Website (created using Flask) - www.codewithha...
►Facebook - / codewithharry
►Instagram - / codewithharry
►Personal Facebook A/c - / geekyharis
Twitter - / haris_is_here
I have completed C, Html, CSS, and Js in one video as well. you have cleared all my doubts. Thankyou.
kuch zyada nahi hua
@@ajazamin9843 She is Papa ki Pari .She can do Anything😂😂😂😂
@@DTPHAMANKUMAR 😂😂
good
I must say that this JavaScript playlist is the best, we are really lucky that we are having this content for free, and from the great dev like you sir, I have tried many courses and institutes like Aptech but what you are teaching is more advanced and understandable just because of your teaching styles and hard work, I'm thanking you from the bottom of my heart for everything you have given to us, highly grateful to you and I appreciate your efforts, may God always keep you in his shelter where you keep achieving the success and may your good dreams and wishes come true.
Kinds regards
Danishraj
love from Pakistan
love you : )
*Thanks.*
you cleared my doubts. You deserve more subscribers. Don't stop making tutorials.
best teacher ever.....
4:00 if anyone is getting their result as null, just to one simple thing. Cut this from header and past it just above . Your problem will be solved ;). Because when we put in the header the JS code gets loaded pretty quickly it may be not ready at that time, and by keeping it just above the JS code will get pretty much time to get proper load and our problem will get resolved.
thanks bro I was stuck their i really appriciated you
thanks bro for the help
you're a saviour bro...
Thank you brother
Thanks Man, You gained my respect :D
Best teacher
Bhai please java ke tutorial le aao
Like jisko java ke tutorial chahiye
May you live long i love your teaching style. Love you😘😘😘😙😙
great explanation of the element selector ....
harry you are really amazing man your teaching style is soo nice thanqq for teaching us :-)
good
for style multiple element at once
let a;
a = document.querySelectorAll('.child');
Array.from(a).forEach(function (element) {
element.style.backgroundColor = 'black';
element.style.color = 'white';
})
Console.log bhul gye 😂😂😂
Thank you so much sir. your videos are really helpful, well explained and understandable .
harry bhai it would be more better if have practice sheet in the tutorial as well
I am truly saying that you are the best !!!!
When I select 'div' by queryselector('div') and then style it styles the entire texts in the 'div class =container' and it turns green and not just ' Welcome to code with harry'
That is because if you notice carefully, the html that harry created in the video has one div inside the body which the first div. All the h1 and other contents are inside that div. Now since document.querySelector('div') targets the first div in the document, therefore all other items also turn green because they are all contained inside the first div.
Hope this helped!
Happy Coding!
@@FlashGaming2018
Thank you yeah I got it after rewatching video ..
Thanks for your response..
For Future Reference:
let element = document.getElementById("myfirst");
element.className;
element.childNodes;
element.parentNode;
element.style.color="red";
element.innerText="Harry is a good boy";
element.innerHTML="Harry is a good boy";
let sel = document.querySelector('#myfirst');
document.querySelector('.child');
document.querySelector('div');
let elems = document.getElementsByClassName('child');
console.log(elems[0].getElementsByClassName('child'));
getElementsByTagName('div');
13:35 - converting HTML collection into Array
Thank You Harry Bhai!!!
Harry is very GOOD boy
sir how to make money step by step after seeing your videos . thoda roadmap dijie Please
Great hai Sir
thank you sir... love uh..
hello bhai
Really you made it easy man !
Thanx Harry
Thanks, bro..
just masterpiece
hatts off harry bhai..... keepit up
love from pakistan
You are the best teacher
Harry Sir
you are great bro
Excellent explanation, big fan!!
Thanks sir
hello bhai
Thank you bhai ❤️
In the line number 23 --- "When you enter sel.style.color ='green' " not only heading is green childs are also green but why ? as we are reading single line selector
Harry Bro please python Django API's ke uppar video series banao please and thanks for this wonderful tutorials.....
Ho sake to please reply karna ....
Very helpful video 👍
we can use loops to print the elements
Very interesting video...thanks Harry Bhai
keep selected dependent dropdown by database after submit
Thank you very much bhai
Uncaught TypeError: Cannot read property 'style' of undefined
Bro use ` this symbol and work only on div
Can uh plz explain properly its still showing uncaught error
cut the script tag and paste it just above the closing body tag. It will work
Luv uh bruh😘😍
thank you brother
thankuu. Meoww
Amazing explanation
Array.from(document.body.getElementsByTagName("p")).forEach(function(ele){console.log(ele.innerText)})
Sir please node is ke bhi tutorial banaiye please
Excellent video
Thank you 💝
What is the difference between document.getElementById and document.write
I am having different outputs when using this on loops
Awesome video
Best Bro
thank you so much sir
Useful lecture
need help,
I am creating a table, I want to show the table, and from each row, there will be a edit button, so how to use that edit button in each row, for different person's data.
how to do undefined table's getElement, I mean please help
*Thanks *
Sir koe website bta dein jahan sy humein sare properties mil jaen you told in this video.
Code with Harry website
Please make a video about bash ...sehll language
hi harrybhai
Uncaught TypeError: Cannot read properties of null (reading 'style')
Good explained I.A.Siddiqui Karachi
Tq sir...
Done done again
What is the difference between parentElement and parentNode?
console.log(document.getElementById("child1").parentNode, "parent node");
console.log(document.getElementById("child1").parentElement, "parent element");
05:16 sir why you had same div with two ids first id = 'myfirst' and then id = 'first' its confusing.
now getting interested
document.querySelector('.someid') giving me null in console but if i am using class name after dot it is giving me that element in console and getting same result with #someClsName
Nice video
nice
Failed to load resource: the server responded with a status of 404 (Not Found)
pls help me with this error i have my files connected properly.
Sir when i use let it gives unexpected identifier error and when i use const it doesn't give ??
I have only one script tag in my html file. But document.scripts is consoling that I have 2 scripts ? Why ?
love to learn
document.querySelectorAll(); yeeh wala bhi toha hae nah ??
Harry bhai getelementbyid ki output null aa raha hai
Plz solution 🙏🙏
Btw video is fantastic
script ko head m add maat kro body m kro nhi ayega null
Sir plz make c++
let element = document .getElementById("myfirst");
->>> it returning null value. why?
mila bhai solution ?? mera bhi yhi aaa rha hai
let element =document.getElementById("print").innerText="Email format is matched";
element.style.color="pink";
css is not working why???color of text is no changed when i used above code
try element.style.color='red' (not red)
any one can explain me why we use JavaScript to change things in our css? we can change it directly from our css?? why we use this selector to change our css??
Sir what do u mean from access the playlist?
Dekho pura playlist, bass
Uncaught TypeError: Cannot read property 'style' of undefined
please tell about this
same problem with me !
Use window.onload= function() {
Your code
}
This will solve your problem. It was happening with me too.
put , before tag
sir g yha tak ham chezen dakhi but ye smjh nai arha k ye web main inak kia use ha
How to use childnodes
i am not getting output in console after writing
let element = document.getElementById('myfirst');
console.log(element);
O/p in console is 'null'
why is this happening?
if you know please let me know
yes i have already created 'myfirst' id in html file
Use myFirst instead of myfirst.
I would like to see you on Sundeep maheshwari stage..
Hiii sirr I am getting this error while running the javascript code in the console
Tut16.js:41 Uncaught TypeError: Cannot read property 'getElementsByClassName' of undefined
at Tut16.js:41
put , before tag
Sir mere laptop may query. Selector nahi chll raha baar baar error show krr raha hai can you tell me about problem of solution
Why i get this error [HTTP/1.1 404 Not Found 0ms]??
How to change inner html content dynamicaly
Why is mine showing undefined in the console .. please reply
show me the code
@@sagarhaldar7559 done bhai 😊 but I need to using the console itself and not the text editor 😊Thanks for the concern
👌👌
where can i find practice questions?
Jo bhi bolo Bhai thumbnail har series ka mast banate hi
exactly ✌️
bhai...jab v mein document.getelementbyId(myfirst); likhta hun tab console mein *null* show kyun kqr raha h?
myfirst ko quotes m likho
Sometimes application need some time interval to load webpage,
Please follow below code,
setTimeout(function(){
let element = document.getElementById('myfirst');
console.log(element);
}, 2000);
Hope it should work for all !!
@@godupliftsyou5426 it worked bro thank you so much!!!
@@godupliftsyou5426 But Why Bro ? Why we can not use only document.getElementById('something');
as a non css user, it was really hard to understand this tutorial.
harry bhai itni language ati h apko or apse syntex bhi mix nhi hote kyu?
sir whenever i am typing let element = document.getElementById("myfirst"); it showing null in console why????
koi problem hoga typing me
id me myfirst ka synatx check kar lo
I also faced the same problem and could not get what is the problem is. And I’m gonna make sure that there were no typing or syntax errors but the problem is not fixed. Does anyone have any suggestions regarding THIS issue?
"myfirst" ko "myFirst" try...reply if it solves the problem...
let element = document.getElementById("myFirst");
console.log(element);
ye karlo , fir ayega sab kuch..
put , before tag
Sorry, I forgot, what was foreach?
solution vdo kahan hai?
sel= document.querySelector('div');
sel.style.color= 'cyan';
console.log(sel);
aisa krne pe mere baki div ke v color change ho rhe hain.
sir please meko thoda clear kre qki jb aap v kr rhe ho toh usme v baki div ke v color change ho rhe hain .
@@anjalimoon619 exactly same question here, did you get the answer please reply.
All turns green
@@bhavingadhiya3844 becoz all the div is inside the
@@anjalimoon619 becoz all the div is inside the
Sir xampp use nhi ho pa rha h uski vjah se mai aage Ka kaam nhi kr pa rha hu kya kru
bhai me ne ap ke video Facebook whatpp pe shere kar diya
👍👍👍
Bhaii live server nahi chal Raha hai .js file mein