Ver Mensaje Individual
  #3 (permalink)  
Antiguo 13/01/2011, 12:53
MAURIXIO5540
 
Fecha de Ingreso: noviembre-2008
Mensajes: 55
Antigüedad: 15 años, 5 meses
Puntos: 0
Respuesta: Cambiar el valor de variable oculta en evento onclick

Cita:
Iniciado por Manuellama Ver Mensaje
<html>
<head>
</head>
<body>
<script>

function cambiarvalor(valor){
if (valor==0){
valor = 1;
}else{
valor =0;
}
document.getElementById('id').value = valor;
}

</script>
<form id="form1" name="form1" method="get" action="">
<input name="id" id="id" type="hidden" value="1" />
<table width="198" border="1" >
<tr>
<td onclick="cambiarvalor(document.getElementById('id' ).value);" >&nbsp;</td>
</tr>
</table>
</form>
</body>
</html>
Gracias...por tu colaboración...el problema ha sido solucionado....