English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The toArray() method retrieves all elements that match the jQuery selector in the form of an array.
$(selector).toArray()
Select all DIVs in the document and then return the DOM elements as an array:
let arr = $("div").toArray(); for (let i = 0; i < arr.length; i++) { alert(arr[i].innerHTML); }Test See‹/›