home / experts / javascript / column23 |
|
You can specify the URL location of the Behavior scriptlet using either HTML or JavaScript. The HTML syntax is:
and the JavaScript syntax is:
where
attribute of the element's style. In our Connect Three game, we first define tripleBox, a generic style label that applies to all element types:
and then we include the
One alternative is to omit the <STYLE> section altogether, and specify the behavior URL directly in each of the nine
Yet another alternative is to specify the behavior URL in the scriptlet itself, similarly to the other style properties set there. The first few JavaScript lines in the scriptlet would have been read like this:
|
Created: August 11, 1998
Revised: August 11, 1998
URL: http://www.webreference.com/js/column23/location.html