HELP! * GREY=local LOCAL HTML version of Foils prepared 15 January 1997

Foil 56 Event Handlers in JavaScript - II

From JavaScript Tutorial for CPS616 Technologies of the Information Age 1997 Basic Information Track of CPS -- Spring Semester 97. by Geoffrey C. Fox * See also color IMAGE
Secs 84.9
You can set event handlers within HTML TAG using syntax like
  • onclick="whattocall(arg1,arg2...)"
Alternatively set event handler explicitly with
  • document.myform.mybutton.onclick=anotherfunction; // where anotherfunction is a function without arguments and there are NO () in this syntax but you must have () when specifying inside TAG
  • Also note JavaScript is case sensitive and onclick is ALL lower case here but in HTML which is not case sensitive you are free to use any case in ONclicK= " .. " syntax



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 Sat May 24 1997