Javascript is an object-oriented language. The objects here are different functions.
VaR jquery = Window. jquery = Window. $ = function (selector, context)
{
//...
// Other internal initialization code goes here
};
You need to know that jquery, window. jquery, window. $ or simply $ can be used interchangeably, because as the Declaration stated in the code block abve tells us, it refers to the same object in memory.
$ Is just an identifier. In many JavaScript frameworks, it is used to point to some major classes.CodeIs not recommended.
[Example] var $ = jqeury; [/example]
$ Is a type of method defined by prototype.
$ ("ID") is the element with the page ID as "ID ".
$ F ("ID") returns the value of the element whose page ID is "ID". This is read-only and cannot be written.
$ () Is a document that is used too frequently in the Dom. A convenient shorthand for the getelementbyid () method. Like this Dom method, this method returns the element of the ID passed in by the parameter.
This is better than the DOM method. You can input multiple IDS as parameters and then $ () returns an array object with all the required elements.
The $ F () method is another popular shorthand. It returns the value of any input form control, such as a text box or a drop-down box. This method can pass in the element ID or element itself.
Source: xuewang (www.xue5.com), original address: http://www.xue5.com/itedu/200802/102501.html