Amogh-Nigam / Assingement

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Assingement

Link: https://javascript.info/task/find-elements/table.html

How to find?…

  1. The table with id="age-table".

ANSWER - ageTable = document.getElementById("age-table")

  1. All label elements inside that table (there should be 3 of them).

ANSWER - ageTable.querySelectorAll("label")

  1. The first td in that table (with the word “Age”).

ANSWER - ageTable.querySelector("td")

  1. The form with name="search".

ANSWER - form1 = document.querySelector("form")

  1. The first input in that form.

form1.querySelectorAll("input")

ANSWER - form1[0]

  1. The last input in that form.

ANSWER - form1[1]

About