From fb49894037ec74a2e7c72e9d2bff1a865a7847e1 Mon Sep 17 00:00:00 2001 From: UO291047 <145019884+UO291047@users.noreply.github.com> Date: Thu, 23 Nov 2023 13:14:31 +0100 Subject: [PATCH] Add files via upload --- agenda.js | 56 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 agenda.js diff --git a/agenda.js b/agenda.js new file mode 100644 index 0000000..c91c142 --- /dev/null +++ b/agenda.js @@ -0,0 +1,56 @@ +class Agenda{ + + constructor(){ + this.url = "http://ergast.com/api/f1/current"; + this.last_api_call = null; + this.las_api_result = null; + } + + cargarDatos(){ + $.ajax({ + dataType: "xml", + url: this.url, + method: 'GET', + success: function(datos){ + //$("h5").text((new XMLSerializer()).serializeToString(datos)); + + //Presentación de los datos contenidos en XML + $('Race',datos).each(function(item){ + var stringDatos = "