Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

235
Vistas
Get value from another #document JavaScript !Doctype

How can I get value from another iframe?

When I inspecting the website and I click on this line:

<input type="hidden" name="1" value="q"›

And I type this to the console:

document.getElementsByName("3")[0].value

I can get the value:

'e'

But if I click outside from iframe, and I check the value I get this result: VM89205:1 Uncaught TypeError: Cannot read properties of undefined (reading 'value') at :1:49

Looks like I have to click inside if I want get the value. Is it possible to get the value without every time click inside?

<iframe name="frame" id="frame" src="TEST.html?token=asdasdasd" style="display: none;"> ==$0 
    #document
      <html>...</html>
     </iframe>                                                                                    
    <form name="apple" id="apple" method="get" action="test.htm?token=asdasdasd" target="dialog">  <input type="hidden" name="1" value="q"›
      <input type="hidden" name="1" value="q"›
      <input type="hidden" name="2" value="wm> 
      <input type="hidden" name="3" value="e"> 
      <input type="hidden" name="4" value="r"› 
      <input type="hidden" name="5" value="e> 
      <input type="hidden" name="6" value="z"> 
      <input type="hidden" name="7" value>
      <input type="hidden" name="8" value="u"> 
      <input type="hidden" name="9" value="i"> 
      <input type="hidden" name="10" value>
about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

To access an iframe's content from outside the iframe (provided, it's not an external domain), use document.getElementById("frame").contentWindow.document.getElementsByName("3")[0].value;

about 4 years ago · Juan Pablo Isaza Denunciar

0

Add name tag

<input type="hidden" name="1" name="q" value="q"›



and then type this to get the value

var v = document.getElementById("q").innerHTML;
console.log(v);
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda