"Lenize - Exercício 2"
Bootstrap 4.1.1 Snippet by psd06t

<link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <link href="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//maxcdn.bootstrapcdn.com/bootstrap/4.1.1/js/bootstrap.min.js"></script> <script src="//cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!DOCTYPE html> <html> <head> <meta charset='utf-8'> <meta http-equiv='X-UA-Compatible' content='IE=edge'> <title>PSD-06t-Lenize</title> <meta name='viewport' content='width=device-width, initial-scale=1'> <link rel='stylesheet' type='text/css' media='screen' href='main.css'> <script src='main.js'></script> </head> <body> <h1>Minha Empresa</h1> <h5>Cadastro de Informações</h5> <br> <form class="was-validated"> <div class="form-group" id="empresacad"> <label for="empresanome">Nome da Empresa</label> <input type="text" class="form-control" id="empresacad" placeholder="Digite o nome da Empresa" name="uname" onblur="empresacad()" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group" id="empresaend"> <label for="empresaendereco">Endereço da empresa</label> <input type="text" class="form-control" id="empresaend" placeholder="Digite o endereço da empresa" name="pswd" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group" id="clientecad"> <label for="cientenome">Nome do Cliente</label> <input type="text" class="form-control" id="clientecad" placeholder="Digite o nome do Cliente" name="uname" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group"> <label for="endcliente">Endereço do Cliente</label> <input type="text" class="form-control" id="cliente-end" placeholder="Digite o endereço do cliente" name="pswd" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group" id="produtocad"> <label for="produtonome">Nome do Produto</label> <input type="text" class="form-control" id="produtocad" placeholder="Inserir Produto" name="uname" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group"> <label for="pwd">Quantidade</label> <input type="text" class="form-control" id="pwd" placeholder="Qual a quantidade" name="pswd" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group" id="cadvenda"> <label for="vendanome">Valor 1</label> <input type="text" class="form-control" id="cadvenda" placeholder="Inserir Produto" name="uname" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group"> <label for="valor2">Valor 2</label> <input type="text" class="form-control" id="pwd" placeholder="Qual a quantidade" name="pswd" required> <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Please fill out this field.</div> </div> <div class="form-group form-check"> <label class="form-check-label"> <input class="form-check-input" type="checkbox" name="remember" required> Eu concordo com os termos <div class="valid-feedback">Valid.</div> <div class="invalid-feedback">Check this checkbox to continue.</div> </label> </div> <button type="submit" class="btn btn-primary">Salvar Dados</button> </form> </body> </html>
var empresanome=nada,empresaendereco=nada,clientenome=nada, function empresacad() { var nome = document.getElementById("empresacad").value; empresanome=nome; var empresaendereco = "Volvo"; // code here CAN use carName } function clientecad() { var nome = document.getElementById("clientecad").value; clientenome=nome; var nome = "Volvo"; // code here CAN use carName } function produtocad() { var nome = document.getElementById("produtocad").value; produto=nome; var carName = "Volvo"; // code here CAN use carName }

Related: See More


Questions / Comments: