|
|
In our previous column we introduced Behaviors, the most significant new JavaScript feature of Internet Explorer 5.0. We have shown how to write a behavior scriptlet and how to communicate between the scriptlet and the containing page. This interface handling is accomplished by the Behavior Handler. The Behavior Handler:
We explain the Behavior Handler via a new example, the popular Connect Three game. It is played by two opponents on a 3x3 board. Each opponent, in his or her turn, places a game piece in one of the unoccupied board locations. In our example, one opponent is using "X"s and the other one is using "O"s. The first to accomplish a row, a column, or a diagonal of identical pieces is the winner. In this column you'll learn:
At this point you may also view the entire file for the hosting page and the behavior scriptlet. |
Created: August 11, 1998
Revised: August 11, 1998
URL: http://www.webreference.com/js/column23/