Solution: Know Your Browser
Exercise solution to "Know Your Browser." where the solution leverages DOM and BOM to create a final webpage with all specified information
We'll cover the following...
We'll cover the following...
Solution
The final solution to the problem is here.
The above solution shows that we do not alter any elements on HTML directly. Instead, use JavaScript to add/remove elements to DOM and fetch certain information through BOM. Let’s see more detail below.
In the above code, do the following.
-
Delete elements with tag names
'p'and'h2'. The HTML page shows that these elements should be deleted. But do the following for both:-
Fetch all elements with tag names for
'h2'(line 2) and'p'(line 7) withdocument.getElementsByTagNamemethod. -
Because of a
NodeList, iterate the list using aforloop for both. ...
-