Aqui te va un pequeño ejemplito....
Código Javascript
:
Ver original<!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>Untitled Document</title>
<script>
function sumar(uno,dos)
{
var total;
total = parseInt(uno.value)+parseInt(dos.value);
<!-- alert("El valor es " + total); -->
document.prueba.total.value = total;
}
</script>
</head>
<body>
<form name="prueba">
uno<input type="text" name="uno">
dos<input type="text" name="dos">
<input type="button" name="Ver total" value="Ver total" onclick="sumar(uno,dos)">
<input type="text" name="total" value=""/>
</form>
</body>
</html>