Hallo Mitleser,
$(document.body).find('*[id]').map(function() { return this.id; }).get();
$('body [id]').map(function() { return this.id; }).get();
oder, wenn im head
oder im html
-Tag keine IDs zu erwarten sind, sogar noch kürzer:
$('[id]').map(function() { return this.id; }).get();
;-)
LG,
CK