jQuery(function($){ //FunciĆ³n para buscar un punto por id $("#botonBuscarPunto").on("click", function(){ $.ajax({ url: 'http://localhost:8080/Api-e004/punto/'+$("#idConsulta").val(), type: 'GET', headers:{ apiKey: "pqntslc" }, success: function(result){ console.log(result); }, error: function(){ console.log("ocurriĆ³ un error"); } }); }); console.log("script cargado: buscarPunto"); });