enter an expression then click the window:

 



<html>
<head>
<script language ="JavaScript">
<!--
function calc(num)
{//click thing not working
document.form1.text2.value=num + "=" + eval(num)
}
//-->
</script>
</head>
<body>
<form name="form1">
enter an expression then click the window:<br>
<input type="text" name ="text1""
onchange="calc(this.value)"><br>
<input type="text" name="text2">
</form>
</body>
</html>