I am creating a web page where you can create two types of users, A and B. For this I have a script where people can decide what type of account to use. Each account re-directs one or the other but I do not know how to do it from a script. Here I have the code:
<h2> Crear cuenta </h2>
<select name="cuenta" id="tipo" >
<option selected value="0"> Tipo de cuenta </option>
<option valor="A">A</option>
<option valor="B">B</option>
</select>
<p id="demo"></p>
<script>
function elegir(){
a = document.getElementById("tipo");
if(a.value == "A")
document.getElementById("demo").innerHTML = "A";
else if (a.value == "B")
document.getElementById("demo").innerHTML = "B";
}
</script>
<button onclick="elegir()">Crear</button>
Right now what he does is print A or B according to the choice, I would like him not to show that, but to go there when he re-directs to one place or another. Would it be possible?