Home > Web Front-end > Front-end Q&A > What does window.$ mean in javascript

What does window.$ mean in javascript

藏色散人
Release: 2023-01-11 09:19:22
Original
3740 people have browsed it

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");
Copy after login

Equivalent to:

document.getElementById("header");
Copy after login

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!

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template