Ver Mensaje Individual
  #3 (permalink)  
Antiguo 28/09/2010, 10:41
Avatar de Perr0
Perr0
 
Fecha de Ingreso: mayo-2005
Ubicación: Santiago de Chile, Chile
Mensajes: 676
Antigüedad: 19 años, 9 meses
Puntos: 79
Respuesta: cambiar valor de boton

con mas parafernalia

Código:
<script type="text/javascript">
function cambiar(){
	var b=document.getElementById("boton")
	if(b.value=="hola"){
		b.value="chao"
		b.style.color="red"
	}else{
		b.value="hola"
		b.style.color="green"
	}
}
</script>
<input name="boton" type="button" value="hola" id="boton" onClick="cambiar()" style="color:green" />