• Empleos
  • Sobre nosotros
  • profesionales
    • Inicio
    • Empleos
    • Cursos y retos
    • Preguntas
    • Profesores
  • empresas
    • Inicio
    • Publicar vacante
    • Nuestro proceso
    • Precios
    • Pruebas Online
    • Nómina
    • Blog
    • Comercial
    • Calculadora de salario

0

149
Vistas
Is it possible to select a visible element on a page with javascript, if it is not in the page source?

I'm try to use javascript to select/auto submit a form that is visible on the page, but it is not in the HTML source of the page. I can see the submit button but there is no iframe or HTML for it in the source of the page. The form was generated with javascript. Is it possible to select this "element" (the submit button) if it isn't in the page source code?

almost 3 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

Yes. It's possible.

As soon as the button element is inserted into the DOM, you can select it.

almost 3 years ago · Juan Pablo Isaza Denunciar

0

The source code will only show you the code it received from the server, everything that javascript does it happens after that and it's added to the DOM dynamically.

You can look at the developer tools on your browser (F12) and you would be able to inspect the javascript-created elements.

With that information you can select the form using its ID, class name or even the form itself. Not sure what framework you're using, of if it's plain vanilla Javascript. If you let me know which one I can provide some examples.

almost 3 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 Nuestro proceso Comercial
Legal
Términos y condiciones Política de privacidad
© 2025 PeakU Inc. All Rights Reserved.

Andres GPT

Recomiéndame algunas ofertas
Necesito ayuda