2
Good afternoon, you guys!
I have my site for example, which has the normal page that every page has, html, head, body, etc... Inside this my page, has an iframe, this iframe pulls another html from another page, getting more or less like this:
<html>
<head></head>
<body>
<iframe>
<html>
<head></head>
<body>
<div class="teste">Teste</div>
</body>
</html>
</iframe>
<script>
$('.teste'); /*Está me retornando null*/
</script>
</body>
</html>
The problem is this, I can’t touch the html of this iframe, I don’t have access to it. If I try to get the value of that test div there with a document.querySelector('.teste')
with jQuery himself with the $('teste');
does not work, because that Document there refers to my document (what I have access to) the iframe document I can not.
You’re always returning me null.
How can I fix this?