tailieunhanh - adobe dreamweaver cs5 on demand part 57

Làm việc với các hành vi Mọi người đều thích tính linh hoạt mà JavaScript có thể mang đến một trang Web, nhưng vẫn không có nhiều người yêu thích lập trình bằng JavaScript, để làm cho nó xảy ra. Dreamweaver làm cho cuộc sống của bạn dễ dàng hơn bằng cách cho phép bạn để hành vi chèn, hầu hết là trực tiếp chuyển thành JavaScript. | Working with Behaviors 15 Introduction Everybody loves the versatility that JavaScript can bring to a Web page yet not that many people love programming in JavaScript to make it happen. Dreamweaver makes your life easier by allowing you to insert Behaviors most of which directly translate into JavaScript. Using behaviors you can do things like insert pop-up windows create disjointed rollovers check to see if users have a certain plug-in or what browser they re running. The best thing about behaviors and commands is that they are extendable. Many third party companies and individuals write commands and behaviors for Dreamweaver. You can download these extensions from the Web most often for free A behavior is a combination of an event with an action triggered by that event. In the Behaviors panel you add a behavior to a page by specifying an action and then specifying the event that triggers that action. Adobe Dreamweaver behaviors insert JavaScript code in documents to allow users to interact with a Web page change the page or to produce certain tasks. Behaviors are attached to a specific element on your page whether it s a text link an image and even certain HTML specific tags. An action consists of pre-written JavaScript code that performs a specific task such as opening a browser window showing or hiding an AP element playing a sound or stopping a Flash movie. The actions provided with Dreamweaver are written by engineers to provide maximum cross-browser compatibility. In this chapter you ll learn how to apply behaviors to Web elements how to edit and modify behaviors even how to create and maintain a library of all your important behaviors. What You ll Do Introduce Behaviors Apply Behaviors to Page Elements Apply Behaviors to Entire Page Edit Behaviors Work with Behaviors Add Behavior Effects Go to Another Web Page Open Another Browser Window Display Text Messages Preload and Swap Images Change Element Properties Drag an AP Element Show and Hide Elements Execute