Ver Mensaje Individual
  #2 (permalink)  
Antiguo 22/11/2011, 07:48
Avatar de linuxzero
linuxzero
 
Fecha de Ingreso: noviembre-2011
Ubicación: Argentina
Mensajes: 778
Antigüedad: 12 años, 6 meses
Puntos: 160
Respuesta: Cambiar label en tiempo de ejecucion!

HTML:
Código HTML:
Ver original
  1. <label id="texto">Numero</label><input type="text" name="dni_padre1" id="dni_padre1">

JS:
Código Javascript:
Ver original
  1. $('#idSelect').change(function() {
  2.     if ($(this).val() == 1) {
  3.         $('#texto').html('Edad');
  4.     } else {
  5.         $('#texto').html('Numero');
  6.     }
  7. })

Seria algo asi, fijate de cambiar la lógica para que te funcione. Esta en jQuery porque es mas facil de codificar :D
__________________
Si todo fuera tan sencillo como un symfony cc la vida seria más fácil.
http://phpnico.wordpress.com