Ver Mensaje Individual
  #7 (permalink)  
Antiguo 16/12/2011, 15:56
kadillo12
 
Fecha de Ingreso: diciembre-2011
Mensajes: 2
Antigüedad: 12 años, 5 meses
Puntos: 0
De acuerdo Respuesta: Asignar valor a un textbox

Cita:
Iniciado por kadillo12 Ver Mensaje
dale asi

<script>
function Calcula(){
document.frm.fecha2.value =<%out.print("'"+dateadd("m",5,date)+"'");%>;
}
</script>

<form name='frm'>
<table width="200" border="1">
<tr>
<td><input type="text" name="fecha1" onblur="Calcula()"></td>
<td><input type="text" name="fecha2"></td>
</tr>
</table>
</form>
y para obtener el tiempo con Date()
import java.util.Date;
Date tiempo=new Date();
tiempo.getSeconds(); etc