-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdocument1js.
More file actions
30 lines (21 loc) · 829 Bytes
/
document1js.
File metadata and controls
30 lines (21 loc) · 829 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
let elements;
elements = document.head;
// head simply prints the head tag of your html page.
console.log(elements);
elements = document.body;
// body simply prints the body of your html page.
console.log(elements)
elements = document.links;
// links is used to find that how many anchor tag used in you html page.
console.log(elements);
elements = document.title;
// title is used to print the text inside you title tag.
console.log(elements);
elements = document.forms;
// used to target all the forms present in you html document.
elements = document.doctype;
// used to you identify which doctype were used in the html document.
elements = document.URL;
// simply return the URL of your website.
elements = document.domain;
// gives the domain name of your website