Lo que pasa es que cambié el nombre.
No tengo hosteada la página.
Te pongo el código por partes, tal vez esté algo mal.
Ésta es la función para ocultar la lista y mostrar el texto:
Código javascript
:
Ver originalfunction mostrar() {
var texto = document.getElementById("stipo");
var lista = document.getElementById("tipo");
texto.innerHTML = lista.value;
texto.style.display = "inline";
lista.style.display = "none";
}
Ésta la función para ocultar el texto y mostrar la lista:
Código javascript
:
Ver originalfunction ocultar() {
var text = document.getElementById("stipo");
var list = document.getElementById("tipo");
text.style.display = "none";
list.style.display = "inline";
}
Éstos son el select y el botón:
Código html:
Ver original<p class="Estilo3">Tipo: __
<u> <span id="stipo"><select name="tipo" id="tipo" onchange="mostrar();" > </u>
<input type="button" id="boton" name="boton" value="Limpiar" onclick="ocultar();" />
¿Encuentras algo mal?
Saludos.