Ver Mensaje Individual
  #2 (permalink)  
Antiguo 03/01/2005, 21:03
Netyco
 
Fecha de Ingreso: enero-2005
Ubicación: Salta - Argentina
Mensajes: 322
Antigüedad: 20 años, 1 mes
Puntos: 7
Hola, aqui te prepare un ejemplo, cualquier cosa avisame...

Código:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>Documento sin t&iacute;tulo</title>
<script>
<!--
function calcular(valor){
resultado=(20*valor/100);
alert("El 20% de "+valor+ " = " + resultado);
write (document.form1.resultado.vaule=resultado);
}
-->
</script>
</head>

<body>
<form name="form1" method="post" action="">
  <p><strong>Ingresar N&ordm;</strong><br>
    <input name="numero" type="text" id="numero">
    <input onclick="javascript:calcular(document.form1.numero.value)" name="Bot&oacute;n" type="button" value="calcular">
    </p>
  <p><strong>    Resultado:</strong><br>    
    <input name="resultado" type="text" id="resultado">
</p>
  <p align="center"><a href="http://www.netyco.com.ar"><strong>Netyco.com.ar Dise&ntilde;o Web &amp; hosting </strong></a></p>
</form>
</body>
</html>

Última edición por Netyco; 03/01/2005 a las 21:11