I revised my code:
PHP Code:
PHP Code:
include("config.php");
?>
<html>
<head>
<!-- <script language="javascript">
function handleEnter(e, nextfield)
{
var characterCode = (e && e.which)? e.which: e.keyCode;
if(characterCode == 13)
{
document.getElementById(nextfield).focus();
return false;
}
else
{
return true;
}
}
</script>
-->
<script language="javascript" >
var inqty = document.getElementById('inqty')
var outqty = document.getElementById('outqty')
myqty = inqty - outqty
document.form-name.myqty.value = myqty
</script>
</head>
<body>
<form action="qty.php" method="post" name="form-name">
Input:<input type='text' name='inqty' id='inqty' />
Output:<input type='text' name='outqty' id='outqty'/> <br>
Qty:<input type='text' name='myqty' id='myqty' /><br>
</form>
</body>
</html>
And it did not work