1. Dom Object
Document Object model. All elements are accessible through the HTML DOM
Get the method: 1. Find the element document.getElementById ("id") by ID
2. Find the Element object collection by tag name document.getElementsByTagName ("");
3. Find the Element object collection by name Document.getelementsbyname (name);
2. jquery Object
The object created after wrapping the DOM object with jquery is unique to jquery. If an object is a jquery object, then you can use the method in jquery.
Note: jquery objects cannot use any of the DOM object's methods, and vice versa.
The two can use the method of the object by converting to each other.
1.Dom objects into jquery objects
For a DOM object, you only need to wrap the DOM object with $ () to get a jquery object.
var domobj = document.getElementById ("zero"); Dom object var $zero = $ (domobj); jquery Object
2.jQuery objects turn into DOM objects
The 1.jQuery object is an array object that can be obtained by using the [index] method of the DOM object
var $zero = $ ("#zero"); var zero = $zero [0];console.log (zero.innerhtml);
2. Through get (index);
var $top = $ (". Top"), var top = $top. Get (0); Console.log (top.innerhtml);
Dom Objects and jquery objects