<head>
<script language="javascript">
<!--
function calc(obj)
{
var num=obj.value
document.form1.text2.value=num+"="+eval(num)
}
//-->
</script>
</head>
<body>
<form name="form1">
Enter an expression, hit enter, and I'll compute the answer<br>
<input type ="text" name="text1"
onchange="calc(this)"><br>
answer<br>
<input type ="text" name="text2" ><br>
</form>
</body>
</html>