We can use the text each GMO involved methods to set content instead of retrieving it.
In this example we have three buttons each button resets the content of a specified each GMO element.
Reset.
Text replaces the first line of text with different text content reset each GMO resets line 2 with this
time with each GMO bull tags embedded into the text reset.
Value replaces the data in the name input field with a different name.
Let's take a look at the script to see how we can reset content
in our HMO code.
We can see that our body tag contains three buttons
each button has a unique I.D. button one button two and three.
We also have our input field that contains the I.D. name and default value.
John Smith.
Next we have our two lines of text each again with a unique I.D..
Text 1 And text 2
now in our script tag.
We have different events and actions set up to reset the content of our HDMI elements.
First we start with a click event on button 1 when button 1 is click the paragraph with I.D. text 1
will have the text reset to new text line
button 2 also has a click event one button 2 is clicked the text in paragraph with I.D. text 2 changes
to the text bold text line the styling of which is bold
button 3s click event triggers of value change in the input field with Ida name the new value will be
jane willis
so once again if we click button 1 the text is reset button to the Texas reset again but this time it's
bold.
And Button 3 resets the name John Smith to Jane wills.