So normally we can get z-Index value of a div element using, e.g:
var zindex = document.getElementById(\'id\').style.zIndex;
I am using this
I believe everything is z-indexed as 0. Really z-index is only valid if you set it for all the elements you care about. You can set the z-index of one div to 100000, but it won't matter if you don't set the z-index of the other element you are trying to overlap.
So I guess what I'm trying to say is that the default z-index of the div doesn't matter, it's only computed if you set it.
A div inside of a div doesn't have a specific z-index. Ad div inside of a div inside of the body inside of an iframe, inside of 3 more divs and 1 table, doesn't have a z-index(or a z-index that's computed.).
I can't see that there would be any practical reason for trying to find a z-index of an item, if it's irrelevant anyways.