Course Hive
Search

Welcome

Sign in or create your account

Continue with Google
or
JavaScript Tutorial in Hindi for Beginners [Part 54] - Change CSS Classes in JavaScript
Play lesson

JavaScript Tutorial in Hindi - JavaScript Tutorial in Hindi for Beginners [Part 54] - Change CSS Classes in JavaScript

4.0 (0)
6 learners

What you'll learn

This course includes

  • 23.5 hours of video
  • Certificate of completion
  • Access on mobile and TV

Summary

Keywords

Full Transcript

#Javascript #Tutorial #Hindi Link for Complete JavaScript Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSvHo6Rp4Ky0X8x_MabmKye Link for Complete HTML and CSS Tutorial in Hindi for Beginners: https://www.youtube.com/playlist?list=PLjpp5kBQLNTSdLVVjU_kea8J8lP24ZseT In this video i will talk about how to Change CSS Classes in JavaScript. Method 1: className property The className property sets or returns the class name of an element (the value of an element's class attribute). Tip: A similar property to className is the classList property. Method 2: classList property The classList property returns the class name(s) of an element, as a DOMTokenList object. This property is useful to add, remove and toggle CSS classes on an element. The classList property is read-only, however, you can modify it by using the add() and remove() methods. Cross-browser solution: The classList property is not supported in IE9 and earlier. However, you can use the className property or regular expressions for a cross-browser solution (see "More Examples" on the bottom of this page). Please subscribe to watch more videos like this: https://www.youtube.com/channel/UCWCGvAu1NDCldmLasELk62g?sub_confirmation=1 Join this channel to support Tech Gun: https://www.youtube.com/channel/UCWCGvAu1NDCldmLasELk62g/join

Course Hive

Continue this lesson in the app

Install CourseHive on Android or iOS to keep learning while you move.

Related Courses

FAQs

Course Hive
Download CourseHive
Keep learning anywhere