Case 1
If you want to hide all divs with no id then you would have to loop all divs and hide them based on that criteria. (find the divs with the .getElementsByTagName())
var alldivs = document.getElementsByTagName('div');
for( var i = 0; i < alldivs.length; i++) {
alldivs[i].style.display = "none";
}
Case 2
If you want to find elements based on a class, like in your example the .ms-globalbreadcrumb then (find the elements with the class with the .getElementsByClassName())
var allbyclass = document.getElementsByClassName('ms-globalbreadcrumb');
for( var i = 0; i < allbyclass.length; i++) {
allbyclass[i].style.display = "none";
}
(the getElementsByClassName will not work for pre IE9 versions of IE)
example with both cases at http://jsfiddle.net/gaby/H3nNr/
suggestion
Use jQuery which allows for a wide variety of selectors and complex traversing of the DOM to find what you want..
- Case 1 in jQuery would be
$('div:not([id])').hide();
- Case 2 in jQuery would be
$('.ms-globalbreadcrumb').hide();