Ver Mensaje Individual
  #7 (permalink)  
Antiguo 15/04/2008, 04:05
Avatar de mgusdl
mgusdl
 
Fecha de Ingreso: abril-2007
Ubicación: Malaga, España
Mensajes: 190
Antigüedad: 17 años
Puntos: 5
Re: Duda boton reset

Pues tendrias que poner algo como
Código HTML:
<script type="text/javascript">
function resetear()
  {
  var frm = document.forms.formu; 
  frm.reset(); // Reseteamos todo
  frm.cp2.value = "hola"; // damos un valor al campo
  return false;
  }
</script>
<form name="formu" action="#" method="post" onReset="return resetear();">
<label for="cp1">campo 1:</label> <input type="text" name="cp1" id="cp1">
<label for="cp2">campo 2:</label> <input type="text" name="cp2" id="cp2">
<label for="cp3">campo 3:</label> <input type="text" name="cp3" id="cp3">
<label for="cp4">campo 4:</label> <input type="text" name="cp4" id="cp4">
</form>