Origin:
& lt;/div & gt;
Want to get text in span elements, find $ ("#test1 span") [0]. ("#test1 span")[0]).text() was converted to jQuery and then retrieved, but the two $ together always felt weird, so the next best thing was to use the value$("#test1 span") [0].textContent or $("#test1 span")[0].innerHTML jQuery object and DOM elementjQuery object is an array-like object that can contain one or more DOM element(s). The operations of jQuery functions are based on jQuery object rather than DOM object. eg. jQuery object “Object[span, span, span]” contains one or more DOM elements “”. The way to access the DOM element in jQuery object: