Basic HTML version of Foils prepared 16 June 98

Foil 16 Form Example

From Overview of Advanced JavaScript -- Web Scripting Language CPS616 Technologies of the Information Age -- Spring Semester 98. by Tom Scavo,Geoffrey C. Fox


<HTML>
<HEAD><TITLE>JavaScript with Forms</TITLE>
<SCRIPT LANGUAGE="JavaScript">
function compute() {
if ( window.confirm("Is this what you want?") )
aForm.result.value = eval(aForm.expr.value);
}
</SCRIPT></HEAD>
<BODY><FORM NAME="aForm"> Enter expression:
<INPUT TYPE="text" NAME="expr" SIZE=15>
<INPUT TYPE="button" VALUE="Compute!"
onClick="compute()"> <BR> Result:
<INPUT TYPE="text" NAME="result" SIZE=15>
</FORM></BODY>
</HTML>



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Sun Nov 29 1998