var frame = document.getElementById('first-frame').contentWindow.document.getElementById('second-frame'); $(frame).чтототам();