Getting all ids in inside js function

Getting all ids in inside js function

In below code, this div have more than one Ids.I Need to get this js function.How to get this in js function?


Code:
 <div id="Ids">'Id'</div>

function idvalue(){

      var idvalues = $('[id="Ids"]');
alert(idvalues );
alert(idvalues.length);
}

I got the 0 length in alert.How to get this?