From 1d4e3966f93cfdaa110ba38b1f2662d033b310d1 Mon Sep 17 00:00:00 2001 From: DarkNtj Date: Fri, 1 Jul 2022 17:54:31 -0300 Subject: [PATCH] java_atividades --- attCadastro.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/attCadastro.html b/attCadastro.html index b6a7dfe..45121b5 100644 --- a/attCadastro.html +++ b/attCadastro.html @@ -9,7 +9,7 @@ - +


@@ -28,7 +28,7 @@ document.getElementById("salvar").addEventListener("click", function () { let objeto = { - entrada: document.getElementById("entrada").value, + nome: document.getElementById("nome").value, idade: document.getElementById("idade").value, }; @@ -43,12 +43,13 @@ for (let index = 0; index < array.length; index++) { let element = array[index]; - console.log(array[index].entrada); + console.log(array[index].nome); console.log(array[index].idade); if (array[index].nome == 'raysson') { - document.getElementById("p").innerText = array[index].idade; + document.getElementById("p").innerText = array[index].nome; + } } console.log(array);