I never know what you can change, an HTML element? Maybe you want to replace the text section to reflect what the visitor selected just from the drop-down box. By manipulating the innerHtml of an element, you can change your text and HTML as much as you like. InnerHTML
Each HTML element has the opening and closing ceremonies of the elements that occur between HTML code and text defined by the InnerHtml attribute. After changing the innerHTML of an element, some users can interact with the webpage.
However, using innerHTML requires some preparation, if you want to use it easily and reliably. First, you must change your ID card. With the identifier in place, you will be able to use the getElementById function, applicable to all browsers.
In your opinion, you can now manipulate the elements of the text. Now, let's try to change the text to a bold flag.
Next let's look at a js innerHTML to change the P value.
The Code is as follows: