|
|
|
@ -351,7 +351,7 @@ As you have notice, the properties of css when we use it in JavaScript is going
|
|
|
|
|
### Exercise: Level 1
|
|
|
|
|
|
|
|
|
|
1. Create an index.html file and put four p elements as above: Get the first paragraph by using **_document.querySelector(tagname)_** and tag name
|
|
|
|
|
2. Get get each of the the paragraph using **_document.querySelector('#id')_** and by their id
|
|
|
|
|
2. Get each of the the paragraph using **_document.querySelector('#id')_** and by their id
|
|
|
|
|
3. Get all the p as nodeList using **_document.querySelectorAll(tagname)_** and by their tag name
|
|
|
|
|
4. Loop through the nodeList and get the text content of each paragraph
|
|
|
|
|
5. Set a text content to paragraph the fourth paragraph,**_Fourth Paragraph_**
|
|
|
|
|