<script type="text/javascript">
function cal(ida,idb,idc)
{
var numa=Number(document.getElementById(ida).value);
var numb = Number(document.getElementById(idb).value);
var numc=numa*numb;
document.getElementById(idc).value=numc;
}
</script>
<body>
<div>
<input type="text" id="numa" name="numa" onkeyup="cal('numa','numb','numc')" />*
<input type="text" id="numb" name="numb" onkeyup="cal('numa','numb','numc')" />=
<input type="text" id="numc" name="numc" onkeyup="cal('numa','numb','numc')" />
</div>
</body>