As in JavaScript, knowing the element class to get its id
<span id="idelement" class="classelement">ТЕСТ</span> I tried it this way but here I get the opposite class and I need an id
var result = window.content.document.getElementById("idelement").className; alert(result);