开发者

how to find anchor tag in a div and push it to an array using jquery

开发者 https://www.devze.com 2023-04-07 19:16 出处:网络
how to find anchor tag in a div and push it to an array usin开发者_如何学运维g jquery. i tried it but my result shows arry=[jquery(a1,a2,a3,a4,a5)] and if i tried to check the array length it shows on

how to find anchor tag in a div and push it to an array usin开发者_如何学运维g jquery. i tried it but my result shows arry=[jquery(a1,a2,a3,a4,a5)] and if i tried to check the array length it shows only one but not 5. please help. Iam getting the anchor tag by $(el).find('a');


There is a toArray method for jQuery objects. These method wil convert the jQuery result to a normal array:

$(el).find('a').toArray();
0

精彩评论

暂无评论...
验证码 换一张
取 消