-4
I want to use the Cpf variable in another function!!
function enviar(){
var nome = document.getElementById('input_Nome').value
var cpf= document.getElementById('input_Cpf').value
var data_de_nascimento = document.getElementById('input_DataDeNascimento').value
var endereço = document.getElementById('input_Endereço').value
var res = document.getElementById('res')
var fsex = document.getElementsByName('radsex')
var fdeficiencia = document.getElementsByName('rad_deficiencia')
var genero = ''
var deficiencia = ''
if (fsex[0].checked){
genero = 'Homem'
}else if (fsex[1].checked){
genero= 'Mulher'
}
if(fdeficiencia[0].checked){
deficiencia = 'Sim'
}else if(fdeficiencia[1].checked){
deficiencia= 'Não'
}
}
Declare out of it...
– Woss
Hello and welcome to Stackoverflow, before you ask questions please take a look at this link how not to ask questions, this will help you to have a higher acceptance rate in your question.
– Brendon Iwata