2 - Change Text with click Events - JSON APIs and AJAX - freeCodeCamp Tutorial
Ganesh H
This challenge can only be completed in a specific way for some reason! We can register a function to the onclick property of an element to change some text when a button has been clicked.
Link to Challenge : https://www.freecodecamp.org/learn/data-visualization/json-apis-and-ajax/change-text-with-click-events Concepts: textContent The textContent property of the Node interface represents the text content of the node and its descendants. https://developer.mozilla.org/en-US/docs/Web/API/Node/textContent
getElementsByClassName() The getElementsByClassName method of Document interface returns an array-like object of all child elements which have all of the given class name(s). When called on the document object, the complete document is searched, including the root node. You may also call getElementsByClassName() on any element; it will return only elements which are descendants of the specified root element with the given class name(s). https://developer.mozilla.org/en-US/docs/Web/API/Document/getElementsByClassName
onclick The onclick property of the GlobalEventHandlers mixin is the EventHandler for processing click events on a given element.The click event is raised when the user clicks on an element. It fires after the mousedown and mouseup events, in that order. https://developer.mozilla.org/en-US/docs/Web/API/GlobalEventHandlers/onclick -————————————————————————————————————- JSON (JavaScript Object Notation) is an open standard file format, and data interchange format, that uses human-readable text to store and transmit data objects consisting of attribute–value pairs and array data types.
Ajax is a set of web development techniques using many web technologies on the client side to create asynchronous web applications. With Ajax, web applications can send and retrieve data from a server asynchronously without interfering with the display and behavior of the existing page.
freeCodeCamp (also referred to as “Free Code Camp”) is a non-profit organization that consists of an interactive learning web platform, an online community forum, chat rooms, online publications and local organizations that intend to make learning web development accessible to anyone. Beginning with tutorials that introduce students to HTML, CSS and JavaScript, students progress to project assignments that they complete either alone or in pairs. Upon completion of all project tasks, students are partnered with other nonprofits to build web applications, giving the students practical development experience.
Thanks for Watching! ... https://www.youtube.com/watch?v=F5Z1GYYsFvQ
16234480 Bytes