3
I want when I click the select "OTHER" to appear next to an input, but so far unsuccessful.
My code HTML and JS:
function mostraCampo( el )
{
var outros = document.getElementById('outros');
if (selectbasic.value == Outros)
outros.style.display = 'block';
else
outros.style.display = 'none';
}
<label class="col-md-3 control-label" for="selectbasic">Item: *</label>
<div class="col-md-3">
<select id="selectbasic" name="selectbasic" class="form-control">
<option value="Banheiro">Banheiro</option>
<option value="Rampa">Rampa</option>
<option value="Elevador">Elevador</option>
<option value="Vaga de Estacionamento">Vaga de Estacionamento</option>
<option value="Outros">Outros</option>
</select>
</div>
<label class="col-md-3 control-label" for="textinput" style="display:none" >Outros:</label>
<div class="col-md-7">
<input type="textinput" name="outros" class="form-control input-md" style="display:none"> </div>
</div>