Rookie learns to use Dreamweaver MX 2004 behavior (2) Cognitive behavioral events

Source: Internet
Author: User
Tags dreamweaver
Dreamweaver

Site original content, reproduced please indicate the source Web page teaching network .

  Awareness of behavioral Events

Behavior is one or more actions taken in response to a specific event. When the specified event is triggered, the corresponding JavaScript program is run and the corresponding action is executed. So when you create the behavior, you must specify an action before specifying the event that triggers the action. Behavior is for all objects in a Web page, and you want to combine an object to add behavior.

Each browser provides a set of events that can be associated with the actions listed in the actions (+) pop-up menu of the Behaviors panel. When visitors to a Web page interact with the page (for example, by clicking an image), the browser generates events, which can be used to invoke the JavaScript function that caused the action to occur. (You can also generate events without user interaction, such as setting the page to automatically reload every 10 seconds.) DW MX 2004 provides a number of common actions that can be triggered using these events.

The events displayed in the Events pop-up menu differ depending on the selected object and the browser specified in the Show Events submenu. To find out which events are supported for the browser given by a given page element, insert the page element into your document and attach a behavior to it, and then view the events pop-up menu in the Behaviors panel. These events are disabled (dimmed) if the related objects do not already exist on the page or the selected objects cannot receive events. If the expected event is not displayed, check to see if the correct object is selected, or change the target browser in the Show events pop-up menu.

If you want to attach the behavior to an image, some events, such as OnMouseOver, are displayed in parentheses. These events are used only for links. When one of them is selected, DW MX 2004 uses a label around the image to define an empty link. In the link text box in the property inspector, the null link is represented as javascript:;. If you want to turn it into a true link to another page, you can change the link value, but if you delete the JavaScript link without replacing it with another link, the behavior is deleted.

In the Action menu, the more actions the newer browsers support, the more we'll get to know them:


(larger picture, please pull the scroll bar to watch)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.