1 What is jquery?
jquery is a package of JS, the underlying code is written in the JS code. It encapsulates a lot of methods and properties that we can use directly, without having to worry about how others are implemented, just by learning to call.
2 Why study jquery?
First, the native JS code has several disadvantages:
A: Compatibility issues
B: More repetitive code
C: Poor fault tolerance
The method name provided by D:dom is too long and easy to write wrong
The advantages of jquery:
A: Lightweight (file is small)
B: The DOM operation is encapsulated, simple to operate
C: Support chain-type operation
D: Support for rich plugins
E: Ajax Support
.....
jquery version?
There are currently 3 large versions of 1.x 2.x 3.x
Version 1.x supports IE6, 7, 8
2.x 3.x version does not support IE6, 7, 8
3: What is a jquery object and what is a DOM object?
jquery object: The element that is obtained through the jquery method is the jquery object
Dom object: The element obtained by the JS method is the DOM object
Note: jquery objects cannot use the properties and methods of Dom objects
DOM objects cannot use the properties and methods of jquery objects
4:jquery objects and DOM objects convert to each other?
A:dom object to jquery object?
var Odiv=document.getelementbyid (' Div1 ');
var jquery object =$ (Odiv);
B:jquery object to Dom object?
1:var odiv=$ (' div ') [0];
2:var odiv=$ (' div '). Get (0);
jquery Objects and Dom objects