Ver Mensaje Individual
  #1 (permalink)  
Antiguo 09/04/2008, 02:54
Laufwerk
 
Fecha de Ingreso: marzo-2007
Mensajes: 538
Antigüedad: 17 años, 1 mes
Puntos: 0
al hacer submit que no actualice

hola amigos tengo el siguiente codigo html que lo que me hace es convertir un password a md5, pero al darle al boton me lo transforma, pero seguidamente me borra los textbox.
Que puedo hacer para que una vez le de al boton se quede alli?

Código:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>password</title>
<link href="estilos/estilos.css" rel="stylesheet" type="text/css" />
<script src="js/md5.js" type="text/javascript"></script>
<script type="text/javascript">
function encriptapass() {
 document.getElementById("encriptado").value = hex_md5(document.getElementById("md5input").value);
}
function colocar() {
	document.getElementById("md5input").focus();
}
</script>
</head>

<body onload="colocar();">
<form id="encrypt_pass" onsubmit="javascript:encriptapass();" method="post">
    <input id="md5input" type="text" style="width:300px;"><br />
    <input value="convertir a MD5" type="submit"> <br />
    <input id="encriptado" type="text" style="width:300px;">
</form>
</body>
</html>