From 65dbc8b9f42d801b1f5cffeb459d18d4469fa047 Mon Sep 17 00:00:00 2001 From: vanessa Date: Fri, 10 Jul 2020 14:45:06 -0300 Subject: [PATCH 1/6] adicionando js --- script.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 script.js diff --git a/script.js b/script.js new file mode 100644 index 0000000..96b9a02 --- /dev/null +++ b/script.js @@ -0,0 +1 @@ +script.js \ No newline at end of file From 5ac8628f77c15fd7bf78a9de13885b4ed7dfe0d9 Mon Sep 17 00:00:00 2001 From: vanessa Date: Fri, 10 Jul 2020 15:35:29 -0300 Subject: [PATCH 2/6] adicionando evento onclick --- index.html | 4 ++-- script.js | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/index.html b/index.html index 0c1f7b4..4c30e03 100644 --- a/index.html +++ b/index.html @@ -39,7 +39,7 @@

Validador de CPF

Digite somente numeros - + diff --git a/script.js b/script.js index a5d0db2..b4947a6 100644 --- a/script.js +++ b/script.js @@ -1,5 +1,24 @@ console.log("javascript carregado"); + +function validaCPF(cpf){ + return false; +} + + function validacao(){ console.log("Iniciando validação CPF"); + + + + var cpf = document.getElementById('cpf_digitado').value; /*o cpf digitado vai ser capiturado atravez do javascript dentro do html e vai ser armazenado dentro da variavel cpf*/ + console.log(cpf) /*exibir valor do cpf*/ + + var resultadoValidacao = validaCPF(cpf); + + if (resultadoValidacao) { + document.getElementById('success').style.display = "block"; + }else{ + document.getElementById('error').style.display = "block"; + } } \ No newline at end of file From 92c194c769332763e9c322834dd8b5a967be40e0 Mon Sep 17 00:00:00 2001 From: vanessa Date: Mon, 13 Jul 2020 19:14:37 -0300 Subject: [PATCH 4/6] validador cpf 3cls --- index.html | 4 ++-- script.js | 35 +++++++++++++++++++---------------- 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/index.html b/index.html index c17ff8f..a6a2dc1 100644 --- a/index.html +++ b/index.html @@ -35,11 +35,11 @@

Validador de CPF

CPF + aria-describedby="sizing-addon1" id="cpf_digitado" >
Digite somente numeros - +