Behavior scripts

Behaviors in Microsoft Expression Web are scripting options that enable you to quickly add interactivity or increased functionality to text or other elements of your web page. You can customize built-in Expression Web Behaviors by using the Behaviors task pane.

A Behavior is a combination of an event and an action that you want to occur when a site visitor interacts with a web page or an element of a page.

Events

An event is a condition that causes a web browser to trigger a script. For example, moving the pointer over a graphic or clicking a link can trigger an event. Event names usually reflect how they are activated. For example, the onMouseOver event is triggered when the mouse pointer moves over a page element. Likewise, the onMouseClick event is activated when the user clicks a page element.

Actions

An action is an instruction that executes when an event occurs. Actions are functions — prewritten blocks of script code — that perform a specific task, such as swapping an image or opening a browser window. After you attach a script to a page element (by using the Behaviors task pane), the browser "calls" the action that is triggered by the event.

Each action requires a set of properties and parameters in order to do a task. In Expression Web, you can view or edit the properties for each action using the Behaviors task pane.

Note

Most Behaviors work with Microsoft Internet Explorer 4.0 or later, and Netscape Navigator 4.0 or later. Some Behaviors, such as Check Plug-in, Change Property, and Control Flash, require Internet Explorer 5 or later, and Netscape Navigator 6.0 or later.

See also

Concepts

Define a behavior for an element

Behaviors task pane

Add or remove an interactive button

Create a page transition effect