Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
Otherwise you'll have to use the Firefox version. So let's take a look at this in the dom. We'll start by getting an element from the dom, we'll place it in a variable called my node. So right now we're targeting this section right here called about the event. If you want to, you can click on the magnifying glass and click on that headline. Let me go ahead and hit enter and test out my node. And sure enough, it has the whole article, now if we do a direct version of this, we can see the different properties available to that node.
Right next to the innerHTML property, we have a property called innerText. If you look at it carefully, you'll see that it's the same text as innerHTML, without any of the HTML tags. So if I type in my node, that innerText, and hit enter, you'll see that it's just the text of that node. So I imagine that if I wanted to get just the text of some content, this might be a really convenient way to do it. This is a read and write property as well, so you can set it, if you want to. I'm not really sure how useful that is because it'll wipe out any sort of formatting or syntax you worked really hard to put in there. Also this version, as I mentioned, is not supported by Firefox. Firefox has a similar property you can use called Text Content. But, unfortunately, Text Content is supported by everything except for Internet Explorer.
So if you want to use these, you'll have to create some if-then statements. A check, which property, the current browser supports. This is the type of thing (LAUGH) that can give you a headache as a web developer, so I would probably stay away from these.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 97308 Viewers
61 Video lessons · 84566 Viewers
71 Video lessons · 68772 Viewers
56 Video lessons · 101255 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.
Your file was successfully uploaded.