Object properties
How do we assign object properties?
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Sonakshi SinghPosted Jan 27, 2012, 12:51 AM
Satyapriya NayakPosted Jan 27, 2012, 12:23 AM
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"
JavaScript window Object Properties
window.closed - indicates whether a window has been closed or not.
window.defaultstatus / window.status - specifies the default message / message displayed in the browser status bar.
window.frames[] - This array holds the array of frame objects of the window
window.name - Contains the name of the window object. (Windows opened by a script need to have a name)
window.opener - contains a reference of the parent window which opened it.
window.parent - contains a reference to the window object that contains the frame
window.screen - contains information about the screen on which the window is displayed like height, width, availHeight, availWidth and colorDepth.
window.self - A reference to the current window.
window.top - A reference to the top-level window when working with frames.
Thanks