@@ -48,6 +48,7 @@ methods:</p>
4848<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
4949<p >You can change the content inside an HTML element using JavaScript. The two most common
5050properties for this are <b ><mark >innerHTML</mark ></b > and <b ><mark >textContent:</mark ></b ></p >
51+
5152<ul >
5253 <li ><b ><mark >innerHTML</mark ></b >: Allows you to get or set the HTML content inside an element.</li >
5354 <li ><b ><mark >textContent</mark ></b >: Allows you to get or set the text content inside an
@@ -110,6 +111,7 @@ properties for this are <b><mark>innerHTML</mark></b> and <b><mark>textContent:<
110111<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
111112<p >You can add, remove, or toggle <b ><mark >classes</mark ></b > on an element using JavaScript.
112113This is helpful for styling or applying animations.</p >
114+
113115<ul >
114116 <li ><b ><mark >classList.add()</mark ></b >: Adds a <b ><mark >class</mark ></b > to an element.</li >
115117 <li ><b ><mark >classList.remove()</mark ></b >: Removes a <b ><mark >class</mark ></b > from an element.</li >
@@ -171,13 +173,13 @@ This is helpful for styling or applying animations.</p>
171173<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
172174<ul >
173175 <li >Adding a Class (<b ><mark >addClass()</mark ></b >): When you click the "Add 'highlight' Class"
174- button, the highlight class is added to the div element with the id="example". This changes
175- the text color to red and makes it bold (as defined in the CSS).</li>
176+ button, the highlight class is added to the div element with the id="example". This changes
177+ the text color to red and makes it bold (as defined in the CSS).</li>
176178 <li >Removing a Class (<b ><mark >removeClass()</mark ></b >): When you click the "Remove 'bold' Class"
177- button, the bold class is removed from the div, which removes the bold styling from the text.</li>
179+ button, the bold class is removed from the div, which removes the bold styling from the text.</li>
178180 <li >Toggling a Class (<b ><mark >toggleClass()</mark ></b >): When you click the "Toggle 'highlight'
179- Class" button, the highlight class is either added or removed, depending on whether it's
180- already present. If the class is present, it will be removed; if not, it will be added.</li>
181+ Class" button, the highlight class is either added or removed, depending on whether it's
182+ already present. If the class is present, it will be removed; if not, it will be added.</li>
181183</ul >
182184<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
183185<h3 >3. Set CSS Styles Using JavaScript</h3 >
@@ -197,11 +199,13 @@ document.getElementById("demo").style.cssText = "color: blue; font-size: 18px;";
197199<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
198200<p >Sometimes, you need to create new elements, add them to the DOM, or remove existing ones.
199201You can do this easily with the following methods;</p >
202+
200203<ul >
201204 <li ><b ><mark >document.createElement()</mark ></b >: Creates a new element.</li >
202205 <li ><b ><mark >appendChild()</mark ></b >: Adds a new element to a parent element.</li >
203206 <li ><b ><mark >removeChild()</mark ></b >: Removes a child element from a parent.</li >
204207</ul >
208+
205209<pre >
206210// Create a new element
207211let newDiv = document.createElement("div");
@@ -216,6 +220,7 @@ document.body.removeChild(newDiv);
216220<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
217221<p >You can insert new elements at specific positions relative to existing elements using methods
218222like <b ><mark >insertBefore()</mark ></b >.</p >
223+
219224<pre >
220225// Create a new element
221226let newDiv = document.createElement("div");
@@ -231,6 +236,7 @@ document.body.insertBefore(newDiv, referenceNode);
231236<h3 >6. Manipulate Element Attributes</h3 >
232237<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
233238<p >You can easily get, set, or remove the attributes of an HTML element using the following methods:</p >
239+
234240<ul >
235241 <li ><b ><mark >getAttribute()</mark ></b >: Retrieves the value of an attribute.</li >
236242 <li ><b ><mark >setAttribute()</mark ></b >: Sets a new value for an attribute.</li >
@@ -253,6 +259,7 @@ document.getElementById("image").removeAttribute("src");
253259<p >HTML5 introduced data attributes, which are custom attributes that you can use to store
254260extra information about an element. These are particularly useful for adding data to an
255261element without affecting its visual structure.</p >
262+
256263<ul >
257264 <li ><b ><mark >dataset</mark ></b >: A special property in JavaScript that allows you to access
258265 data attributes.</li>
@@ -269,13 +276,13 @@ console.log(userId); // Outputs: 12345
269276<h2 id =" D02 " >02 How to Add a <b ><mark >Class</mark ></b > to <b ><mark >DOM Element</mark ></b >
270277in JavaScript?</h2 >
271278<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
272- <p >Adding a class to a <b ><mark >DOM (Document Object Model)</mark ></b > element in JavaScript
273- is a fundamental task that enables developers to dynamically manipulate the appearance and
274- behavior of web pages. Classes in HTML provide a powerful way to apply CSS styles or
275- JavaScript functionality to multiple elements at once.</p >
279+ <p >Adding a class to a <b ><mark >DOM (Document Object Model)</mark ></b > element in JavaScript is a
280+ fundamental task that enables developers to dynamically manipulate the appearance and behavior of
281+ web pages. Classes in HTML provide a powerful way to apply CSS styles or JavaScript functionality
282+ to multiple elements at once.</p >
276283
277- <p >By using JavaScript, you can easily add, remove, or toggle classes on elements, making
278- your web applications more interactive and responsive to user actions.</p >
284+ <p >By using JavaScript, you can easily add, remove, or toggle classes on elements, making your web
285+ applications more interactive and responsive to user actions.</p >
279286
280287<p >These are the following approaches:</p >
281288<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -343,9 +350,9 @@ add class name to elements. We will access the <b><mark>div</mark></b> using the
343350<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
344351<h3 >Using <b ><mark >className</mark ></b > Property</h3 >
345352<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
346- In this approach, we are using the <b ><mark >className</mark ></b > property. This property
347- returns the <b ><mark >className</mark ></b > of the element. If the element has already a
348- class then it will simply add another one to it or else it will append our new class to it.
353+ In this approach, we are using the <b ><mark >className</mark ></b > property. This property returns
354+ the <b ><mark >className</mark ></b > of the element. If the element has already a class then it will
355+ simply add another one to it or else it will append our new class to it.
349356<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
350357<h4 >Syntax:</h4 >
351358<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -524,8 +531,8 @@ elements with the specified class name.</p>
524531<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
525532<h3 id =" D03-03 " >03. Using <b ><mark >getElementsByTagName</mark ></b ></h3 >
526533<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
527- <p >This method selects elements based on their tag name. It returns a collection of elements
528- with the specified tag name.</p >
534+ <p >This method selects elements based on their tag name. It returns a collection of elements with
535+ the specified tag name.</p >
529536<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
530537<h4 >Syntax:</h4 >
531538<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -576,8 +583,8 @@ with the specified tag name.</p>
576583<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
577584<h3 id =" D03-04 " >04. Using <b ><mark >querySelector</mark ></b ></h3 >
578585<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
579- <p >This method selects the first element that matches a specified CSS selector. It returns
580- only one element.</p >
586+ <p >This method selects the first element that matches a specified CSS selector. It returns only one
587+ element.</p >
581588<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
582589<h4 >Syntax:</h4 >
583590<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -681,14 +688,14 @@ containing all elements that match the specified CSS selector.</p>
681688<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
682689<h2 id =" D04 " >04. How to get all ID of the DOM elements with JavaScript?</h2 >
683690<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
684- <p >Given a HTML document and the task is to get the all ID of the DOM elements in an array.
685- There are two methods to solve this problem which are discusses below:</p >
691+ <p >Given a HTML document and the task is to get the all ID of the DOM elements in an array. There
692+ are two methods to solve this problem which are discusses below:</p >
686693<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
687694<h3 >Approach 1:</h3 >
688695<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
689- <p >First select all elements using <b ><mark >$(‘*’)</mark ></b > selector, which selects every
690- element of the document. Use <b ><mark >.each()</mark ></b > method to traverse all elements and
691- check if it has an ID. If it has an ID then push it into the array.</p >
696+ <p >First select all elements using <b ><mark >$(‘*’)</mark ></b > selector, which selects every element
697+ of the document. Use <b ><mark >.each()</mark ></b > method to traverse all elements and check if it has
698+ an ID. If it has an ID then push it into the array.</p >
692699<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
693700<h4 >Example: This example implements the above approach.</h4 >
694701<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -885,10 +892,10 @@ const dataId = e.dataset.dataID //Access the data-id attribute
885892<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
886893<h3 >2. Using getAttribute() Method</h3 >
887894<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
888- <p >The <b ><mark >getAttribute()</mark ></b > method in JavaScript retrieves the value of a
889- specified attribute from an HTML element. To get data attributes, use
890- < b >< mark >element.getAttribute(‘ data-attribute’)</ mark ></ b >. This method allows precise
891- selection and manipulation of individual data attributes without accessing all at once.</ p >
895+ <p >The <b ><mark >getAttribute()</mark ></b > method in JavaScript retrieves the value of a specified
896+ attribute from an HTML element. To get data attributes, use < b >< mark >element.getAttribute(‘data-attribute’)</ mark ></ b >. This method allows precise selection
897+ and manipulation of individual data attributes without accessing all at once.</ p >
898+
892899<pre >
893900< ; !DOCTYPE html> ;
894901< ; html> ;
@@ -942,8 +949,8 @@ selection and manipulation of individual data attributes without accessing all a
942949<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
943950<p >When working with the DOM in JavaScript, selecting elements by their class names is a common
944951task. JavaScript provides several methods to achieve this, whether we need to select one or
945- multiple elements. In this article, we will cover different approaches to get elements by
946- class name in JavaScript.</p >
952+ multiple elements. In this article, we will cover different approaches to get elements by class
953+ name in JavaScript.</p >
947954<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
948955<h4 >Prerequisites</h4 >
949956<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -952,6 +959,7 @@ class name in JavaScript.</p>
952959 <li >CSS</li >
953960 <li >JavaScript</li >
954961</ul >
962+
955963<p >Below are the following approaches to get elements by class name in Javascript:</p >
956964<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
957965<h4 >Table of Content</h4 >
@@ -1511,6 +1519,7 @@ be used for getting the port, domain, and protocol as it has inbuilt methods to
15111519 <li >The <b ><mark >url.port</mark ></b > property is used to return the port of the URL. It returns ” if the port is
15121520 not described explicitly.</li>
15131521</ul >
1522+
15141523<p >Note: This API is not supported in Internet Explorer 11.</p >
15151524<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
15161525<h4 >Syntax:</h4 >
@@ -1584,6 +1593,7 @@ port = url_object.port;
15841593</a >
15851594</p >
15861595<!-- image037.png -->
1596+
15871597<ul >
15881598 <li ><b >After</b > Clicking the button:</li >
15891599</ul >
@@ -1735,8 +1745,8 @@ extraction of the hostname on that URL.</h4>
17351745<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
17361746<h3 id =" D11-01 " >01. Using <b ><mark >Document.URL</mark ></b > Property</h3 >
17371747<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
1738- <p >The DOM URL property in HTML is used to return a string that contains the complete URL of
1739- the current document. The string also includes the HTTP protocol such as ( http://).</p >
1748+ <p >The DOM URL property in HTML is used to return a string that contains the complete URL of the
1749+ current document. The string also includes the HTTP protocol such as ( http://).</p >
17401750<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
17411751<h4 >Syntax</h4 >
17421752<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -1760,9 +1770,9 @@ console.log(currentUrl);
17601770<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
17611771<h3 id =" D11-02 " >02. Using <b ><mark >window.location.href</mark ></b > Property</h3 >
17621772<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
1763- <p >The <b ><mark >window.location.href</mark ></b > property of the HTML DOM Window object returns a string containing
1764- the URL of the current page. This property is part of the Location object, which contains
1765- information about the current location of the document.</p >
1773+ <p >The <b ><mark >window.location.href</mark ></b > property of the HTML DOM Window object returns a
1774+ string containing the URL of the current page. This property is part of the Location object, which
1775+ contains information about the current location of the document.</p >
17661776<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
17671777<h4 >Syntax</h4 >
17681778<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -1999,8 +2009,8 @@ geeksforgeeks.org
19992009?search=query
20002010</pre >
20012011<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2002- <h4 >Method 2: In this method we will use <b ><mark >URL()</mark ></b > to create a new URL object and then use it for
2003- parsing the provided URL.</h4 >
2012+ <h4 >Method 2: In this method we will use <b ><mark >URL()</mark ></b > to create a new URL object and
2013+ then use it for parsing the provided URL.</h4 >
20042014<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
20052015<pre >
20062016// Store the URL into variable
@@ -2048,6 +2058,7 @@ styles, and content. This allows us to create dynamic and interactive web pages.
20482058
20492059<p >Methods to Identify the elements to manipulate: There are several methods to identify
20502060the HTML elements that we want to manipulate using JavaScript. The most common methods are:</p >
2061+
20512062<ul >
20522063 <li >Using the element's ID: We can assign an ID to an HTML element and use
20532064 <b><mark>document.getElementById()</mark></b> to access it.</li>
@@ -2056,10 +2067,11 @@ the HTML elements that we want to manipulate using JavaScript. The most common m
20562067 <li >Using the element's tag name: We can use <b ><mark >document.getElementsByTagName()</mark ></b >
20572068 to access all elements with a particular tag name.</li>
20582069</ul >
2070+
20592071<p >Accessing the properties of the elements: Once we have identified the HTML element that we
20602072want to manipulate, we can access its properties using JavaScript. For example, to access the
2061- text content of an element, we can use the <b ><mark >innerHTML</mark ></b > property. Similarly, we can access the
2062- style properties of an element using the style property.</p >
2073+ text content of an element, we can use the <b ><mark >innerHTML</mark ></b > property. Similarly,
2074+ we can access the style properties of an element using the style property.</p >
20632075
20642076<p >Use <b ><mark >Event Listeners</mark ></b > to Respond to User Interactions: We can use event
20652077listeners to respond to user interactions such as clicking a button or hovering over an
@@ -2078,6 +2090,7 @@ to use these methods and show you how to access and manipulate elements in your
20782090<p >The first step in working with HTML elements in JavaScript is to identify the element you
20792091want to manipulate. There are several ways to do this, depending on the specific element
20802092you're trying to access. Here are some common methods:</p >
2093+
20812094<ul >
20822095 <li ><b ><mark >getElementById()</mark ></b > Method: Use this method to access an element with a
20832096 specific ID. IDs should be unique within an HTML document, so this method will always return
@@ -2129,6 +2142,7 @@ button.addEventListener("click", function() {
21292142});
21302143</script >
21312144</pre >
2145+
21322146<p >In this example, we use getElementById() to access a button element with the ID "myButton".
21332147We then add an event listener to the button using the <b ><mark >addEventListener()</mark ></b >
21342148method. The event we're listening for is a "click" event, which is triggered when the user
@@ -2258,8 +2272,8 @@ to create the desired behavior.</p>
22582272<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
22592273<h2 id =" D15 " >15. How to use innerHTML in JavaScript?</h2 >
22602274<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2261- <p >The <b ><mark >innerHTML</mark ></b > property in JavaScript allows you to get or set the HTML content of an element
2262- as a string.</p >
2275+ <p >The <b ><mark >innerHTML</mark ></b > property in JavaScript allows you to get or set the HTML
2276+ content of an element as a string.</p >
22632277<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
22642278<h4 >Syntax For</h4 >
22652279<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
@@ -2277,13 +2291,15 @@ let element = document.getElementById("myElementId");
22772291element.innerHTML = "New HTML content";
22782292</pre >
22792293<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2280- <h3 >Here are step-by-step instructions on how to use the <b ><mark >innerHTML</mark ></b > property in JavaScript</h3 >
2294+ <h3 >Here are step-by-step instructions on how to use the <b ><mark >innerHTML</mark ></b > property
2295+ in JavaScript</h3 >
22812296<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
22822297<h4 >Step 1: Access an HTML element</h4 >
22832298<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
2284- <p >Use JavaScript to select the HTML element you want to manipulate. You can do this using
2285- various methods like <b ><mark >document.getElementById()</mark ></b >, <b ><mark >document.querySelector()</mark ></b >,
2299+ <p >Use JavaScript to select the HTML element you want to manipulate. You can do this using various
2300+ methods like <b ><mark >document.getElementById()</mark ></b >, <b ><mark >document.querySelector()</mark ></b >,
22862301or <b ><mark >document.querySelectorAll()</mark ></b >.</p >
2302+
22872303<pre >
22882304< ; div id="myElement"> ; Initial content< ; /div> ;
22892305let element = document.getElementById("myElement");
@@ -2292,6 +2308,7 @@ let element = document.getElementById("myElement");
22922308<h4 >Step 2: Get the HTML content</h4 >
22932309<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
22942310<p >If you want to retrieve the current HTML content of the element, use the innerHTML property.</p >
2311+
22952312<pre >
22962313let htmlContent = element.innerHTML;
22972314console.log(htmlContent);
@@ -2302,12 +2319,14 @@ console.log(htmlContent);
23022319<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
23032320<p >If you want to replace or update the HTML content of the element, assign a new HTML
23042321string to the innerHTML property.</p >
2322+
23052323<pre >element.innerHTML = "<b >New content</b >";</pre >
23062324<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
23072325<h4 >Step 4: Verify the changes(optional)</h4 >
23082326<!-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~-->
23092327<p >You can optionally verify that the HTML content has been updated as expected by accessing the
23102328element again or using browser developer tools.</p >
2329+
23112330<pre >
23122331console.log(element.innerHTML);
23132332 // Output: <b >New content</b >
@@ -2401,7 +2420,6 @@ property to append HTML directly to an element.</h4>
24012420 < ; script> ;
24022421 const container = document.getElementById('container');
24032422 container.innerHTML +=
2404- `
24052423 < ; h3> ;
24062424 Hey Geek, < ; br/> ;
24072425 Welcome to GeeksforGeeks
@@ -2467,7 +2485,6 @@ event to add HTML onclick to the button.</h4>
24672485 const container =
24682486 document.getElementById('container');
24692487 container.innerHTML +=
2470- `
24712488 < ; h3> ;
24722489 Hey Geek, < ; br/> ;
24732490 Welcome to GeeksforGeeks
0 commit comments