Basic HTML version of Foils prepared 23 June 1997

Foil 56 Event Handlers in JavaScript - II

From JavaScript Tutorial for Certificate Course UC Web applications Certificate -- Summer 97. by Geoffrey C. Fox, Tom Scavo


You can specify event handlers within an HTML tag using attributes such as
  • onClick="myFunc(arg1,arg2...)"
Recall that JavaScript is case sensitive, but since HTML is case insensitive the onClick keyword may be any mixture of upper and lowercase
Alternatively, specify event handlers as in
  • document.myForm.myButton.onclick=myFunc;
  • where myFunc is a function without arguments or parentheses



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 Wed Apr 1 1998