Home  >  Article  >  Web Front-end  >  What does window.$ mean in javascript

What does window.$ mean in javascript

藏色散人
藏色散人Original
2021-09-10 15:21:193653browse

window.$ in JavaScript means to pass the window object into this anonymous function and execute this function at the same time, before the page is loaded.

What does window.$ mean in javascript

The operating environment of this article: windows7 system, javascript version 1.8.5, Dell G3 computer.

What does window.$ mean in javascript?

means, pass the window object into this anonymous function, and execute this function at the same time, before the page is loaded; the parentheses have a return value, that is, the function within the parentheses or The return value of the expression, so the return value of the function within the parentheses is equal to the return value of the parentheses.

Related introduction:

JavaScript Window - Browser Object Model

The Browser Object Model (Browser Object Model (BOM)) allows JavaScript and browsing machine conversation.

No official standard exists for the Browser Object Model (BOM).

Modern browsers have implemented (almost) the same methods and properties for JavaScript interaction, so it is often mentioned as a method and property of the BOM.

Window object

All browsers support the window object. It represents the browser window.

All global JavaScript objects, functions and variables automatically become members of the window object.

Global variables are properties of the window object.

Global functions are methods of the window object.

Even the document object (of HTML DOM) is also a window object attribute:

window.document.getElementById("header");

Equivalent to:

document.getElementById("header");

Recommended learning: "javascript basic tutorial"

The above is the detailed content of What does window.$ mean in javascript. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn