-
Notifications
You must be signed in to change notification settings - Fork 0
/
Task2.rtf
32 lines (26 loc) · 2.4 KB
/
Task2.rtf
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
31
32
{\rtf1\ansi\ansicpg1252\deff0\nouicompat\deflang1033{\fonttbl{\f0\fnil\fcharset0 Calibri;}{\f1\fnil\fcharset2 Symbol;}}
{\*\generator Riched20 10.0.17134}\viewkind4\uc1
\pard\sa200\sl276\slmult1\f0\fs22\lang9\par
Name: Thenmozhi L\par
1. Different between Documents & window Objects\b\par
\pard\sa200\sl276\slmult1 \ul Documents\ulnone\b0\par
\pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}\fi-360\li720\sa200\sl276\slmult1 It represents any HTML document or web page that is loaded in the browser and loaded inside the window\par
{\pntext\f1\'B7\tab}It is the object of window property.\par
{\pntext\f1\'B7\tab}All the tags, elements with attributes in HTML are part of the document.\par
{\pntext\f1\'B7\tab}We can access the document from a window using the \b window. document\b0 .\par
{\pntext\f1\'B7\tab}The document is part of BOM (browser object model) and dom (Document object model)\par
{\pntext\f1\'B7\tab}Properties of document objects such as title, body, cookies, etc can also be accessed by a window like this \b window. document.title. Syntax: document.propertyname;\b0\par
{\pntext\f1\'B7\tab}\b Ex: document.title : will return the title of the document.\b0\par
\pard\sa200\sl276\slmult1\b \ul Window\ulnone\b0 \par
\pard{\pntext\f1\'B7\tab}{\*\pn\pnlvlblt\pnf1\pnindent0{\pntxtb\'B7}}\fi-360\li720\sa200\sl276\slmult1 It represents a browser window or frame that displays the contents of the webpage.\par
{\pntext\f1\'B7\tab}It is the very first object that is loaded in the browser and it is the object of the browser.\par
{\pntext\f1\'B7\tab}Global objects, functions, and variables of JavaScript are members of the window object.\par
{\pntext\f1\'B7\tab}We can access the window from the window only(Ex : window.window) and also part of BOM not DOM. \par
{\pntext\f1\'B7\tab}Properties of the window object cannot be accessed by the document object.\par
{\pntext\f1\'B7\tab}\b Syntax\b0 : window.propertyname; \par
{\pntext\f1\'B7\tab}\b EX : window.innerHeight \b0 : will return the height of the content area of the browser.\par
\pard\sa200\sl276\slmult1 \par
------------------END-------------------\par
\pard\sa200\sl276\slmult1\par
}