How do you assign object properties in JavaScript?
Java script object properties are assigned like assigning a value to a variable.
For
example, the title property of document object can be assigned as follows:
document.title="Welcome to the world of Javascripting";
The submit value of form’s action object is assigned as follows:
Document.form.action=”submit”
How do you assign object properties in JavaScript?
JavaScript window Object Properties
1. window.closed - indicates whether a window has been closed or not.
2. window.defaultstatus / window.status - specifies the default message / message displayed in the browser status bar.
3. window.frames[] - This array holds the array of frame objects of the window
4. window.name - Contains the name of the window object. (Windows opened by a script need to have a name)
5. window.opener - contains a reference of the parent window which opened it.
6. window.parent - contains a reference to the window object that contains the frame
7. window.screen - contains information about the screen on which the window is displayed like height, width, availHeight, availWidth and colorDepth.
8. window.self - A reference to the current window.
9. window.top - A reference to the top-level window when working with frames.