Geography contains powerful methods of changing and manipulating the Document Object Model or DOMA.
This includes changing both HMO elements and attributes.
In this lesson we'll work with retrieving the value of an element using the J query text and HDMI methods
in this example.
We have two buttons and some text contained within a paragraph if we click the first button.
A text box appears which contains the text found in the paragraph.
Clicking the second button also launches a text box but this time the text contains the HMO elements
as well.
Now let's go through the script to see how this was done.
First we can see in the body take that we have two buttons one button with the I.D. button one and the
other with I.D. button two
our paragraph as the eye the lying one.
It contains a line of text with italics in bold times
our script located in the head tag.
Starts with a click event for Button 1
when button 1 is clicked an alert appears with the contents of our paragraph with I.D..
Line 1
the DOT text method is attached.
This will output the text from the paragraph into the other in text format as we saw in the demonstration
the next function is a cookie event on button 2 when button 2 is clicked the alert box appears with
the contents with the contents of line 1.
This time the output is an HMO format.
This means the HMO tags will be visible in the open.
Let's take a second look in our web browser.
So once again if we could show text we see the line of text without any HDMI output.
If we could show each GMO we can see the line of text with this time with the HMO elements also visible
italic and bold.