Object properties
How do we assign object properties?
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Satyapriya NayakRank #47 · 31.5K reputationPosted Jan 26, 2012, 7:23 PM EST
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
Sonakshi SinghRank #624 · 3.8K reputationPosted Jan 26, 2012, 7:51 PM EST