Ver Mensaje Individual
  #3 (permalink)  
Antiguo 04/06/2014, 12:39
gmyb
 
Fecha de Ingreso: junio-2011
Ubicación: uruguay
Mensajes: 42
Antigüedad: 12 años, 10 meses
Puntos: 0
Respuesta: Problema mostrando texto con radio button

Hola, es este:

Código:
<html> 
<head> 
<script> 
function Pregunta1(){ 
document.getElementById('pregunta').innerHTML = "¿Cuál es la pregunta 1?<br>" 
document.form.texto.value = "Respuesta 1"} 
function Pregunta2(){ 
document.getElementById('pregunta').innerHTML = "¿Cuál es la pregunta 2?<br>" 
document.form.texto.value = "Respuesta 2"} 
function Pregunta3(){ 
document.getElementById('pregunta').innerHTML = "¿Cuál es la pregunta 3?<br>" 
document.form.texto.value = "Respuesta 3"} 
function Pregunta4(){ 
document.getElementById('pregunta').innerHTML = "¿Cuál es la pregunta 4?<br>" 
document.form.texto.value = "Respuesta 4"} 
</script> 
</head> 
<body> 
<form name=form> 
<input type="radio" name="Radio" value="Uno" Onfocus="Pregunta1()">Uno<br> 
<input type="radio" name="Radio" value="Dos" Onfocus="Pregunta2()">Dos<br> 
<input type="radio" name="Radio" value="Tres" Onfocus="Pregunta3()">Tres<br> 
<input type="radio" name="Radio" value="cuatro" Onfocus="Pregunta4()">Cuatro<br> 
<table border=0 cellpadding=0 cellspacing=0 width="100%" style="border-collapse: collapse" bordercolor="#111111"> 
<tr> 
<td id="pregunta">Seleccione una Opción</td> 
</tr> 
<tr> 
<td><input type="text" name="texto"></td> 
</tr> 
</table> 
</form> 
</body> 
</html>