"Menu Javascript - Professor"
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 ----------> <label for="weather">Selecione uma opção para trabalhar: </label> <select id="weather"> <option value="">--Escolha uma opção--</option> <option value="1">Cadastrar Comprador</option> <option value="2">Cadastro de Automovel</option> <option value="3">Cadastro de Venda</option> <option value="4">Sair do Sistema</option> </select> <p></p> <script> var select = document.querySelector('select'); var para = document.querySelector('p'); select.addEventListener('change', setWeather); function setWeather() { var choice = select.value; if (choice === '1') { para.textContent = 'Menu de cadstro de comprador'; } else if (choice === '2') { para.textContent = 'Menu de cadastro de automóvel para venda'; } else if (choice === '3') { para.textContent = 'Menu de cadastro de venda'; } else if (choice === '4') { para.textContent = 'Sair do sistema, indo para página principal'; } else { para.textContent = ''; } } </script>

Related: See More


Questions / Comments: