开发者

Get the value of id from spans inside a div using jquery

I want to get the id value from the span开发者_运维百科s.

Thanks Jean


var ids = $('div span').map(function() {
    return $(this).attr('id');
});

Your question isn't very clear so this is all I can come up with.


$('span').each(function() {
    alert(this.id);
});
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜