I'm stuck in a problem. I made a html form and created a javascript document, but the function I created did not work (as if I was not even calling it) I already tried several things and I still can not.
Here are the codes:
function validar(){
var d = document.formulario;
if(d.nome.value==""){
alert("Campo em branco");
return false;
}
}
<!DOCTYPE html>
<html>
<head>
<title>Aula Prática</title>
<script type="text/javascript" src="js/formularioScript.js"></script>
<meta charset="UTF-8">
</head>
<body>
<form id="formulario">
<div>
ID: <input type:"text" id="formId" placeholder="Digite sua ID">
<br></br>
</div>
<div>
Nome: <input type="text" id="nome" placeholder="Digite seu nome">
<br></br>
</div>
<div>
CPF: <input type="text" id="formCpf" placeholder="Digite deu CPF">
<br></br>
</div>
<div>
Data: <input type="date" id="formData">
<br></br>
</div>
<div>
Gênero: <input type="integer" id="formGen">
<br></br>
</div>
<div>
Ano: <input type="integer" id="formAno">
<br></br>
</div>
<div>
Semestre: <input type="integer" id="formSem">
<br></br>
</div>
<div>
Número de Disciplinas: <input type="integer" id="formDisci">
<br></br>
</div>
<div>
Email: <input type="text" id="formEmail">
<br></br>
</div>
<div>
Cor Administrador: <input type="text" id="formCor">
<br></br>
</div>
<input type="button" id="validar" value="Confirmar" onclick="validar()">
</form>
</body>
</html>