From c162492e55ea4c0bf865cddc0b177feb49a35e29 Mon Sep 17 00:00:00 2001 From: guii-fig Date: Tue, 27 Jan 2026 10:26:56 -0300 Subject: [PATCH] commit --- index.html | 11 ++++++----- index.js | 19 +++++++++++++++++++ 2 files changed, 25 insertions(+), 5 deletions(-) create mode 100644 index.js diff --git a/index.html b/index.html index ddecaef7..c0413540 100644 --- a/index.html +++ b/index.html @@ -250,12 +250,12 @@

Novo Usuário

@@ -512,11 +512,11 @@

Novo Usuário

- +
- +
@@ -524,7 +524,7 @@

Novo Usuário

@@ -555,5 +555,6 @@

Novo Usuário

+ \ No newline at end of file diff --git a/index.js b/index.js new file mode 100644 index 00000000..9ed6fd6c --- /dev/null +++ b/index.js @@ -0,0 +1,19 @@ +let fields = document.querySelectorAll("#form-user-create [name]"); +let user = {}; + +fields.forEach(function(field, index) { + + if (field.name == "gender") { + + if (field.checked) { + user[field.name] = field.value; + + } + } else { + user[field.name] = field.value; + + } + +}); + +console.log(user); \ No newline at end of file