js get iframe document code example Example: iframe getelementbyid document.getElementById('myframe1').contentWindow.document.getElementById('x')