“iframe getElementByid” Código de respuesta

iframe getElementByid

document.getElementById('myframe1').contentWindow.document.getElementById('x')
Relieved Reindeer

Cómo obtener elemento en iframe usando JavaScript

const iframe = document.getElementById("myIframe");

const iWindow = iframe.contentWindow;
const iDocument = iWindow.document;

// accessing the element
const element = iDocument.getElementsByTagName("p")[0];
element.style.color = "green";
Thoughtful Turtle

Respuestas similares a “iframe getElementByid”

Preguntas similares a “iframe getElementByid”

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código