If you want to access a collection of elements to get one of these a JQuery can be usedeqOrget (n)Index number method or the acquisition,Should pay attention to, returns jquery object, get (n) and index returns dom element object. For the jquery object can only use jquery methods, while the dom object can only use dom methods, such as to obtain the third <div> element content. The following two methods:
Code:
( "div"). eq (2). html (); / / call the jquery object's method
( "div"). get (2). innerHTML; / / call the method attribute dom
Bookmarks