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 window

  • window.innerHeight - ब्राउजर सञ्झ्यालको भित्री उचाइ

  • window.innerWidth - the inner width of the browser window

  • window.innerWidth - ब्राउजर सञ्झ्यालको भित्री चौडाइ

Note: window.document is same as document.location as the document object model(DOM) is part of window object.

Note: window.document document.location जस्तै हो किनकि कागजात वस्तु मोडेल(डोम) सञ्झ्याल वस्तुको भाग हो।

Few examples of the window methods

सञ्झ्याल विधिका केही उदाहरणहरू

  • window.open() - open a new window

  • window.open() - नयाँ सञ्झ्याल खोल्नुहोस्

  • window.close() - close the current window

  • window.close() - हालको सञ्झ्याल बन्द गर्नुहोस्

  • window.moveTo() - move the current window

  • window.moveTo() - हालको सञ्झ्याल सार्नुहोस्

  • window.resizeTo() - resize the current window

  • window.resizeTo() - हालको सञ्झ्याल पुन: साइज गर्नुहोस्

results matching ""

    No results matching ""