} //--> </script> </head> <body> <form name="form1"> enter an int <input type="text" name="text2"> <input type="button" value="calculate" onclick="alert(calc(text2.value))"><br>
</form> </body> </html>