Window (सञ्झ्याल)
The window object represents the browser window and is supported by the browsers. Global variables, objects, and functions are also part of the window object.
सञ्झ्याल (window) वस्तुले ब्राउजर सञ्झ्यालको प्रतिनिधित्व गर्दछ र ब्राउजरहरू द्वारा समर्थित छ। विश्वव्यापी चलहरू, वस्तुहरू, र प्रकार्यहरू पनि सञ्झ्याल वस्तुको भाग हुन्।
Global variables are properties and functions are methods of the window object.
विश्वव्यापी चर गुणहरू हुन् र प्रकार्यहरू सञ्झ्याल वस्तुको विधिहरू हुन्।
Let's take an example of the screen properties. It is used to determine the size of the browser window and is measured in pixels.
आउनुहोस् स्क्रिन गुणहरूको उदाहरण लिनुहोस्। यो ब्राउजर सञ्झ्यालको साइज निर्धारण गर्न प्रयोग गरिन्छ र पिक्सेलमा मापन गरिन्छ।
window.innerHeight- the inner height of the browser windowwindow.innerHeight- ब्राउजर सञ्झ्यालको भित्री उचाइwindow.innerWidth- the inner width of the browser windowwindow.innerWidth- ब्राउजर सञ्झ्यालको भित्री चौडाइ
Note:
window.documentis same asdocument.locationas the document object model(DOM) is part of window object.Note:
window.documentdocument.locationजस्तै हो किनकि कागजात वस्तु मोडेल(डोम) सञ्झ्याल वस्तुको भाग हो।
Few examples of the window methods
सञ्झ्याल विधिका केही उदाहरणहरू
window.open()- open a new windowwindow.open()- नयाँ सञ्झ्याल खोल्नुहोस्window.close()- close the current windowwindow.close()- हालको सञ्झ्याल बन्द गर्नुहोस्window.moveTo()- move the current windowwindow.moveTo()- हालको सञ्झ्याल सार्नुहोस्window.resizeTo()- resize the current windowwindow.resizeTo()- हालको सञ्झ्याल पुन: साइज गर्नुहोस्