[Código Javascript] Mostrar/Ocultar Texto al hacer clic - FORO - www.unViciomas.com

Pertenece al Grupo " Visitante "     MP MP( )   
Elige un Tema y Crea tu Post!




  • Página 1 de 1
  • 1
FORO - www.unViciomas.com » TUTORIALES Y AYUDAS # » T. Para Internet o Webs » [Código Javascript] Mostrar/Ocultar Texto al hacer clic
[Código Javascript] Mostrar/Ocultar Texto al hacer clic
unViciomás
Fecha: Viernes, 23/11/2012, 7:29 PM | Link del Mensaje # 1

Oficial
STATUS: Offline
POSTS:
2215

PREMIOS:
0

REPUTACIÓN:
2

OBSERVACIONES:

RANGO:

[Código Javascript] Mostrar/Ocultar Texto al hacer clic

Hola, les traigo un sencillo código, que al apretar mostrar aparece el texto y al apretar ocultar desaparece el texto, el código:

Quote
<!--- Código --->

<script type="text/javascript">
OCULTO="none";
VISIBLE="block";
function mostrar1(blo) {
document.getElementById(blo).style.display=VISIBLE;
document.getElementById('ver_off1').style.display=VISIBLE;
document.getElementById('ver_on1').style.display=OCULTO;
}
function ocultar1(blo) {
document.getElementById(blo).style.display=OCULTO;
document.getElementById('ver_off1').style.display=OCULTO;
document.getElementById('ver_on1').style.display=VISIBLE;
}
</script>

<div id="bloque1" style="display: none;"><span style="color: rgb(0, 0, 0);">Texto que aparecerá al hacer click</span></div>

<div id="ver_on1" style="display: block;"><a onclick="mostrar1('bloque1')" href="#">Mostrar</a></div>
<div id="ver_off1" style="display: none;"><a onclick="ocultar1('bloque1')" href="#">No Mostrar</a></div>

<!--- /Código --->




AYUDA A LA PAGINA, REGISTRATE!!

Un Vicio Mas - File Sharing


Compartir en:
 
FORO - www.unViciomas.com » TUTORIALES Y AYUDAS # » T. Para Internet o Webs » [Código Javascript] Mostrar/Ocultar Texto al hacer clic
  • Página 1 de 1
  • 1
Búscar:






Registrate y sube tus Posts Gracias por Registrarte! Ya puedes Subir lo que mas te Guste!!



Copyright UnVicioMás © 2024 Contáctenos