SEARCH
0-9 A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
Prev | Current Page 778 | Next

Joseph W. Lowery

"Dreamweaver CS3 Bible"


However, most of the code??”there can be a lot of code to handle all the cross-browser contingencies??”is
placed between tags in the .
Adding a behavior
The procedure for adding (or attaching) a behavior is simple. As noted earlier, you can assign only certain
events to particular tags, and these options are further limited by the type of browser used.
Even in the latest browsers, key events such as onMouseDown, onMouseOver, and
onMouseOut work only with anchor tags. To circumvent this limitation, Dreamweaver can
enclose an element, such as , with an anchor tag that links to nowhere??”src=???javascript:;???.
Events that use the anchor tag in this fashion appear in parentheses in the drop-down list of events.
To add a behavior to an element in your Web page, follow these steps:
1. Select an object (element) in the Document window.
If you want to assign a behavior to the entire page, select the tag from the Tag
Selector (below the Document window).
2. Open the Behaviors panel by choosing Window ??? Behaviors or by pressing Shift+F4.
3. Click the Add (+) button to reveal the available options, as shown in Figure 12-2. Select one from
the drop-down list.
4. Enter the desired values in the action??™s parameter dialog box.


Pages:
766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790