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

190
Vistas
get Json data (Showing error - 'Request is not excuted')

get Json data (Showing error - 'Request is not excuted') How to make a request executed code.

country.js

$("#btn-id").click(function() {
 //get data    
$.getJSON("https://reqres.in/api/users?page=2", 
function(json) {
//Empty div if clicked agian
$("#data-id").html('')
//loop through it
json.data.forEach(function(jd) {
  //append data in div 
  $("#data-id").append(jd.id + "--" + jd.email + '<br>');
})
});
});

HTML FILE

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
  <title>The jQuery Example</title>
  <script src="country.js"></script>
 </head>

  <body>
<form>
  <input type="button" id ="btn-id" value = "Click to Load Data"  />
   <div id="data-id"></div>
   </form>
   
   <script src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
    <script src="country.js"></script>

   </body>
 </html>

get Json data (Showing error - 'Request is not excuted') How to make a request executed code.

about 4 years ago · Juan Pablo Isaza
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