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

81
Vistas
iFrame with DIV and Jquery is not working

I am trying to use content of other website into my website. I tried using DIV with Jquery instead of iframe tag <iframe>

My Codes :

<head>
<script type='text/javascript' src='http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js?ver=1.4'></script>

<script type='text/javascript'>
$(document).ready(function (){
$('#divframe').load('http://www.example.com');     
});
</script>
</head>
<body>
<div id="divframe"></div>
</body>

it returning no value and not showing the content of the example.com on my website. means the page is empty & blank.

Edited: I am looking for iframe solution without iframe, object, embed tag.

Please help me to get it fixed :)

about 4 years ago · Santiago Trujillo
1 Respuestas
Responde la pregunta

0

You need to use iframe tag and attr() to do this.

NOTE : you also need to be sure that the url of the website is not protected to be loaded via 3rd party site frame of iframe like youtube.com, google.com, etc.

https://en.wikipedia.org/wiki/Framekiller

$(document).ready(function (){
  $('#divframe').attr("src", "https://wikipedia.org/wiki/Main_Page");
});
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<iframe id="divframe" style="width:100%;height:95vh"></iframe>

about 4 years ago · Santiago Trujillo 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