Basic HTML version of Foils prepared 1 Dec 97

Foil 11 Form Example

From Overview of Basic JavaScript -- Web Client Scripting Language Jackson State CSC499 -- Fall Semester 97. by Tom Scavo,Geoffrey C. Fox


1 <HTML>
2 <HEAD><TITLE>JavaScript with Forms</TITLE>
3 <SCRIPT LANGUAGE="JavaScript">
4 function compute() {
5 if ( confirm("Is this what you want?") )
6 aForm.result.value = eval(aForm.expr.value);
7 }
8 </SCRIPT></HEAD>
9 <BODY><FORM NAME="aForm"> Enter expression:
10 <INPUT TYPE="text" NAME="expr" SIZE=15>
11 <INPUT TYPE="button" VALUE="Compute!"
12 onClick="compute()"> <BR> Result:
13 <INPUT TYPE="text" NAME="result" SIZE=15>
14 </FORM></BODY>
15 </HTML>

in Table To:


© 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