<html> <head> </head> <body> <p></p> <p></p> <p></p> <p></p> <p></p> <script> collection =document.getElementsByTagName('p') e=[].map.call(collection, function(x){return x}) e.shift() alert([collection.length, e.length]) </script> </body> </html>