This method is used to precisely filter out a matching subset on top of the selector (you can use a leading limit range):
1.start: the position at which to start selecting a subset. The first element is 0. If it is a negative number, you can select it from the tail of the collection
2.end: end Pick Your own position, if not specified, it is the end of itself
3. The parameter contains the start, does not contain the end [start, end]
Instance:
<! DOCTYPE html> $(function(){ $(' Li '). each (function(Index) {$ ( This). HTML (index); }); varArr = $ (' li '). Slice (2,7);//This method contains the start but not the end, and the corner label is calculated from 0 for(vari=0; i<arr.length;i++){ //Console.log (arr[i].innerhtml);Console.log (Arr[i]); } });</script>
[jquery filter Slice (start, [end])] This method is used to precisely filter out a subset of matches on top of the selector (you can use a leading limit range)