In the javascript innerHTML mean that have both property of HTML code and the text. This is used for switches the text.
Here is the Script:
Demo
Color in this page are Black
However, using innerHTML requires some preparation if you want to be able to use it easily and reliably. First, you must give the element you wish to change and. With that id in place you will be able to use the getElementById function, which works on all browsers.
Leave a Reply