Add styles in JavaScript | get or set attributes in JavaScript | JavaScript dom | DOM manipulation

แชร์
ฝัง
  • เผยแพร่เมื่อ 11 ธ.ค. 2024

ความคิดเห็น • 55

  • @codecreator5016
    @codecreator5016 ปีที่แล้ว +4

    1)apply styles to elemnt through js
    2)get the attribute of html thtough js -->by uing getAttribute() method
    3)setAttribute() methos is used to set the class
    4)classList.add() -->this is used to add class
    4)classList.remove() -->this is used to remove class

  • @ManojKumar-manu
    @ManojKumar-manu 6 หลายเดือนก่อน +1

    one of the best and efficient narrating the concept, Thank you so much

  • @sivaraman58
    @sivaraman58 ปีที่แล้ว +1

    Excellent teaching madam

  • @sirishasundara3277
    @sirishasundara3277 9 หลายเดือนก่อน +1

    Your teaching is well mam. I have some douts but don't this vedio .

  • @shaikhassain4276
    @shaikhassain4276 ปีที่แล้ว +1

    classList.add("two","three","four"); ila kuga rasko vachu madam separate ga kakunda.

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว +1

      Yes can add,by cama seperate

  • @tharunthaduri8865
    @tharunthaduri8865 ปีที่แล้ว +1

    hi, how can I store CSS value(ex: background color of a div) in JS, if I want to store div background color in a variable and later can I use that variable to color another element? I've tried below method but it's not working at all.
    tag = document.getElementById("one");
    var styles = window.getComputedStyle(tag);
    var tagColor = style.getPropertyValue("color");

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว

      use backgroundColor
      color is for text color

  • @chandramouli3618
    @chandramouli3618 2 ปีที่แล้ว +1

    Everything is fine mam but some voice disturbance is there mam. Apart from your way of explaining fabulous mam. Tks alot for making this type of videos

    • @csworldtelugu
      @csworldtelugu  2 ปีที่แล้ว

      Thank you so much,Glad that you like my teaching,that is fan noise.

  • @shaikhassain4276
    @shaikhassain4276 11 หลายเดือนก่อน +1

    Akka difference between class list.add() and .setAttribute()?

    • @csworldtelugu
      @csworldtelugu  10 หลายเดือนก่อน

      Classlist.add only for adding class names,using set attribute you can set any attribute like class name,id,title ...

  • @shaikhassain4276
    @shaikhassain4276 ปีที่แล้ว +1

    akka multiple styles oke line lo ivvalema. Nv separate lines lo rastunnav for color, margin,padding etc...

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว +1

      Object form lo ivvali,there I mentioned only single style each time

  • @sivachandra3969
    @sivachandra3969 2 ปีที่แล้ว +2

    mind-blowing explanation madam. madam meeku instagram undha?

  • @prashanthambala8891
    @prashanthambala8891 ปีที่แล้ว +1

    How do I multiline comments in the javascript shortcut key??

  • @jhansibalasitty8017
    @jhansibalasitty8017 ปีที่แล้ว +1

    Hi akka I have one dought
    Script is your Wright only body part
    But I am writing to the head part is not working why

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว +1

      In javascript if you are trying to access /update any html elements before it's occurence then it shows error.So always prefer to write javascript at end of body tag

  • @chandukiliveti397
    @chandukiliveti397 2 ปีที่แล้ว +1

    Medam your teaching and complete everything is good but voice disturbances and length of video also lengthy compared to another channel try to reduce that .

  • @deadpoolx520
    @deadpoolx520 8 หลายเดือนก่อน +1

    Akka konni chotla ' ' idi inko chota" " vaduthunnav ela gaina vadocha ?

  • @ykalingarao8808
    @ykalingarao8808 2 ปีที่แล้ว +1

    Madam 17minute 30 seconds daggara vere folder images open kavatle ..dot tho kuda ala open cheyyali

    • @csworldtelugu
      @csworldtelugu  2 ปีที่แล้ว

      Show the path you used?

    • @ykalingarao8808
      @ykalingarao8808 2 ปีที่แล้ว

      @@csworldtelugu
      0) my program location--vs code= C:\Users\DELL\OneDrive\Desktop\html\amazon shopping\public\javascript\23.2.html
      1)--C:\Users\DELL\OneDrive\Desktop\html\amazon shopping\public\images\Angular.jpg=system path
      1)
      1 --> open avuthundi
      2)-- C:\Users\DELL\OneDrive\Desktop\html\amazon shopping\public\javascript\fc.png
      open avvatle

    • @csworldtelugu
      @csworldtelugu  2 ปีที่แล้ว

      Meru path aa file related means ../ like or absolute means from the folder which you opened in vacode

    • @ykalingarao8808
      @ykalingarao8808 2 ปีที่แล้ว

      @@csworldtelugu kinni open avuthunnae kinni kavatle andhukani madam

  • @kishorereddy7187
    @kishorereddy7187 ปีที่แล้ว

    Can you make a video on whenever we click on a button in the nav bar it redirects to a specific part of same htm page for example in the nav bar we click on home button that related content is dispalyed on a particular section in the screen ( a part of body) like that again click on something option like for example categories then that category section will be dispalyed on the same section that is home page diplayed before b

    • @kishorereddy7187
      @kishorereddy7187 ปีที่แล้ว +1

      Or you can suggest me to done that what I have to learn frames are available but that's too old

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว +1

      Hi you have to write like below
      Section1

      This is section1

      Give id to the section in achor tag href you have to give #id of section

    • @kishorereddy7187
      @kishorereddy7187 ปีที่แล้ว +1

      @@csworldtelugu tnq👏👏😗😗

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว

      @@kishorereddy7187 welcome

  • @tejatejule-1113
    @tejatejule-1113 4 หลายเดือนก่อน +1

    ela unnav swathi

  • @nikshipthadesireddy3857
    @nikshipthadesireddy3857 ปีที่แล้ว +1

    Mam naku oka doubt ee styles avvani manam css file lo easy ga change cheyyachu kada mari js lo nduku change cheyyadam

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว

      If you want to add it dynamically then javascript helps

  • @JaniChitchatsWithFun
    @JaniChitchatsWithFun ปีที่แล้ว +1

    styles lo image paytavacha

  • @tejas6038
    @tejas6038 2 ปีที่แล้ว +1

    Thanks mam

  • @deepafrontenddeveloper
    @deepafrontenddeveloper 2 ปีที่แล้ว +1

    Nice explanation 👌, from where are you learning this all concepts?.

    • @csworldtelugu
      @csworldtelugu  2 ปีที่แล้ว +1

      Thank you,Books & Internet

    • @deepafrontenddeveloper
      @deepafrontenddeveloper 2 ปีที่แล้ว

      @@csworldtelugu thanks for the reply, can u please share those books names and official documents,

  • @madarbasha584
    @madarbasha584 ปีที่แล้ว +1

    Name:

    var z=document.getElementById("fn")
    console.log(z.getAttirubute('value'))
    z.setAttribute('value',"xyz")
    ERROR :-
    
    practive.html:28 Uncaught TypeError: x.getAttirubute is not a function
    at practive.html:28:23
    I WANT RESULT, THIS TYPE ERROR

    • @csworldtelugu
      @csworldtelugu  ปีที่แล้ว

      Send your full code to csworlddoubts@gmail.com