#24 getElementByClassName method in JavaScript

Поділитися
Вставка
  • Опубліковано 11 жов 2024
  • In this video tutorial we will learn how to take iuse the getElementsByClassName() method in JavaScript.
    The getElementsByClassName() method returns a collection of all elements in the document with the specified class name, as a NodeList object.
    The NodeList object represents a collection of nodes. The nodes can be accessed by index numbers. The index starts at 0.
    Video by - Tanmay Sakpal
    Simple Snippets Channel link - / simplesnippets

КОМЕНТАРІ • 59

  • @yt.user-zull
    @yt.user-zull 6 років тому +23

    Illustrated nicely! 👌
    Guys, I recommend you to code along with the series videos. If you are a beginner, just watching the videos is not enough.
    You will get a lot by coding along. After you understood here everything, explore the internet, try experimenting with the code on your own creativities. Doing so is a fun and it will definitely make you the master of that concept.

    • @SimpleSnippets
      @SimpleSnippets 6 років тому +2

      Best tip ever for beginners ♥✌

  • @cypo1875
    @cypo1875 2 роки тому +1

    I'M GIVING THE BIGGEST LIKE EVER! I've been struggling with this for solid 2 hours and couldn't find working solution until now! thanks a lot

  • @ahnaffaiyaz1892
    @ahnaffaiyaz1892 3 роки тому +1

    I've spent lyk 3 days trying to figure this crap out....... turns out its this simple. Thanks a lot man, you explained it very well.

  • @akhileshyaduwanshi6411
    @akhileshyaduwanshi6411 6 років тому +17

    Series is going good...Great work Tanmay

    • @SimpleSnippets
      @SimpleSnippets 6 років тому +3

      Thank you so much Akhilesh. I have seen your positive comments & support on other videos as well ✌😇 Thanks bro for the constant support. Means a lot to me ✌

  • @slickwillie3376
    @slickwillie3376 4 роки тому +4

    This is a great series! My version of HTML is different. It accepts only strings such as "large", "medium", etc, instead of integers like 25, 11, 12, etc. It took me a while to figure that one out, but I'm back in the game now LOL.

  • @NIDHISHARMA-ep6nc
    @NIDHISHARMA-ep6nc 5 років тому +4

    Thanks bro :)
    These videos are crisp and clear 👌

  • @EXPERIMENTSHOW.
    @EXPERIMENTSHOW. Місяць тому +1

    Thanx bro ❤

  • @studyonline3236
    @studyonline3236 4 роки тому

    crystal clear explanation between the use of id and class

  • @prakharsrivastava6003
    @prakharsrivastava6003 4 роки тому +1

    This video help everyone difference between I'd and class

  • @bijaykishorepatra8113
    @bijaykishorepatra8113 5 років тому +1

    Thanks Tanmay for this video... Good explanation

  • @xiaosage
    @xiaosage 5 років тому

    Best teacher, very clear !!!

  • @darshanpatel32
    @darshanpatel32 5 років тому

    beautiful explanation to understand these topics which covered in this video

  • @shadabalikhan1259
    @shadabalikhan1259 5 років тому +1

    sir, how many videos are left in this series. And how many days will you take for this series?

  • @KalyaniRaipur18
    @KalyaniRaipur18 2 роки тому

    sir,we can also do it by array method,by using getElementByTagName method,instead of getElementByclassName method.

  • @srinivaspunna2422
    @srinivaspunna2422 4 роки тому

    Simply awesome... I also recommended to my friends

  • @sreejareddygummi4900
    @sreejareddygummi4900 4 роки тому

    So,we can't do manipulations like changing text with getElementsByClassName method?

  • @ramakrishnachimmani2835
    @ramakrishnachimmani2835 5 років тому

    you have taken it as array
    then if you give number of anchor tags does it apply the colour in odd places to anchor tag

  • @aleandracilia4752
    @aleandracilia4752 4 роки тому

    Very helpful and easy to understand. Thanks!

  • @vinays9030
    @vinays9030 5 років тому

    Hai thank you for your java script video u and sir are both are explain in easy way and its easy to understand JS my request is plz do small projects

  • @vishalborate9608
    @vishalborate9608 Рік тому

    why
    document.getElementsByClassName("className").style.color="colorName";
    is not working???

  • @likhithakande2902
    @likhithakande2902 3 роки тому

    I had a dought tanmay bro,that Instead of writing class attribute can we write name attribute

  • @TheMasterLP
    @TheMasterLP Рік тому

    I think is a bad practice to have an script into , this must go in the last line before you close and call the javascript funcion in a javascript file calle by src

  • @Sai-cc5wh
    @Sai-cc5wh 4 роки тому

    fontweight fontsize is not coming. Should we add any extensions for that?

  • @satvikkushwaha9326
    @satvikkushwaha9326 4 роки тому

    why do we have to pass a value in getElementById method and why is it not required to do so in tag name and class method

  • @shubhamsonarikar8877
    @shubhamsonarikar8877 6 років тому +1

    Hi sir brilliant to watch your videos...plz make a video on Sap it's importance which is mostly takative now days in market

    • @SimpleSnippets
      @SimpleSnippets 6 років тому +1

      Thank you so much Shubham. So happy to hear this from you. About SAP, I am not really into that tech(even though I did an internship is that domain). So I can talk theory about it but the practical implementation is a different scenario altogether. So maybe in future will collab with some expert for that ✌

  • @ShrutiPandeySGIS
    @ShrutiPandeySGIS 4 роки тому

    Really great

  • @anushakakaraparthi3460
    @anushakakaraparthi3460 4 роки тому

    Neat and clear explanation tq

  • @varshakapil8224
    @varshakapil8224 5 років тому

    Wonderful video

  • @sudhakarverma8452
    @sudhakarverma8452 6 років тому

    Amazing video sir

  • @warrior6488
    @warrior6488 6 років тому +3

    Sir I want to learn website development and its language (html, css, Javascript) I don't have any programming knowledge before because I'm a commerce background student
    So I want to know from where I can learn html css and Javascript for free..
    Plzzzz zzzzzzzzzzzzzzzzzzzzzzzxzx help me

    • @SimpleSnippets
      @SimpleSnippets 6 років тому +6

      Well if you are an absolute beginner, you can find good HTML, CSS & JS tutorials anywhere on the internet and youtube. For JS I would recommend this series itself. For HTML & CSS basics you can easily search many tutorials and channels on youtube. Just watch 2-3 videos from every channel and see which you like and then continue with that.
      Also I would recommend that since you an absolute beginner, learn a general purpose programming language also. The 3 basic ones I would recommend are -
      C++, Core Java & Python. All these videos are there on this Telusko channel itself so even that will be very helpful you in future ✌😇
      All the best ✌

  • @shalinidixit73
    @shalinidixit73 3 роки тому

    If we want to change font size by using claas name then how can we change it???

  • @saransaran2752
    @saransaran2752 5 років тому

    Bro ...my code is not responding....I just want to change the background colour of the page if user click any where in the webpage.......I used
    var a = getElementsByTagName("body");
    And wrote a.style.backgroundcolor="red"; but doesn't show nothing....plz help me

    • @yogeswariboddapati9876
      @yogeswariboddapati9876 5 років тому +1

      use capital C in backgroundcolor
      a.style.backgroundColor="red";
      and try it may be it works

  • @faisaltahseen4063
    @faisaltahseen4063 4 роки тому

    Can do you code this without the for loop code or at least explain the logic. I know that you covered it but it was some time before... :).

  • @avikanodiya7239
    @avikanodiya7239 5 років тому +1

    Why next video is private by the way i see all videos all expain nicely thansk

  • @lubalaltu9827
    @lubalaltu9827 6 років тому +1

    its really great video...n what you say at the end of the video it sound like peace

    • @SimpleSnippets
      @SimpleSnippets 6 років тому

      Thank you so much for the compliment buddy. And yeah it is Peace ✌ I like to end my videos on a positive note so I say that. Plus I find it cool as well 😉

  • @bidhanroy1038
    @bidhanroy1038 5 років тому

    we can use array type like previos video like tag[0],tag[2] like this.
    so why we ll use class?

    • @bhushanmisal4789
      @bhushanmisal4789 5 років тому

      We can do this but Continuous iteration is always preferred over that for discrete values of x

    • @hrishikeshceekay869
      @hrishikeshceekay869 5 років тому

      can we use name="" instead of class.. what is the difference?

  • @rakeshkumarcrk
    @rakeshkumarcrk 4 роки тому

    Is there is any way get id dynamically ?

  • @mikeespinola3164
    @mikeespinola3164 2 роки тому

    Good video bro, like and susb.

  • @rajashekhar433
    @rajashekhar433 6 років тому +1

    Why its getElementsById not as getElementBy

    • @SimpleSnippets
      @SimpleSnippets 6 років тому +1

      Typo buddy. Happens 😜 Good observations though ✌

  • @mdmasummia8570
    @mdmasummia8570 3 роки тому

    Thank You!!!

  • @manavnaharwal1921
    @manavnaharwal1921 4 роки тому

    thanks Brother !!

  • @kavishshah5586
    @kavishshah5586 4 роки тому

    good

  • @dhruvkumar-br2lp
    @dhruvkumar-br2lp Рік тому

    👍

  • @MdShaquib-eq8ls
    @MdShaquib-eq8ls Рік тому

    Thanks bud

  • @mettukirankumarreddy5187
    @mettukirankumarreddy5187 5 років тому

    Please make videos on angular6

  • @surajyadav-tb3yt
    @surajyadav-tb3yt 4 роки тому

    advance label tak banaia Tanmay vaia

  • @lklk398
    @lklk398 2 роки тому

    Simple snipptes

  • @basiccoder2166
    @basiccoder2166 2 роки тому

    Telusko voice was weird 3 years ago

  • @sanjays395
    @sanjays395 5 років тому +1

    Peace Bruh!! ;-)