1. Trang chủ
  2. » Công Nghệ Thông Tin

adobe dreamweaver cs5 on demand part 59 docx

6 263 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 6
Dung lượng 725,79 KB

Nội dung

ptg 362 Chapter 15 The Go To URL behavior gives you the ability to link an element on a Web page to an URL address. For example, you can create a Web page, and then use the Go To URL behavior to direct visitors to other sites and pages, or you can create a set of interactive buttons for use on a standard HTML driven Web site. Whichever option you choose, the ability to direct a visitor to other Web sites is essential to creating Internet-oriented documents. Going to Another Web Page Use the Go To URL Behavior Open the Web page you want to apply a behavior. Click the Window menu, and then click Behaviors to display the Behaviors panel. Click the element you want to add the Go To URL behavior. Click the Add Behavior button (plus sign), and then click Go To URL. A dialog box appears, allowing you to set the details of the action. Type the URL or click Browse, select the URL from the Select File dialog box, and then click OK. Click OK. To cha ng e th e tri gger, clic k th e event, click the Event list arrow, and then select the event you want. 7 6 5 4 3 2 1 1 4 3 2 6 5 7 From the Library of Wow! eBook ptg Chapter 15 Working with Behaviors 363 The Open Browser behavior allows you to set a hyperlink to open in a new browser window. When you use the Open Browser behavior, you need to specify the URL you want to open in the new browser window and any window attributes, such as width, height, navigation and loca- tion toolbar, status bar, menu bar, scrollbar as needed and resize han- dles. If you want to use this behavior with text, you can also use the Change Property and Change Property Restore behaviors to change the pointer to a hand when visitors hover over your text link. Opening Another Browser Window Open Another Browser Window Open the Web page you want to apply a behavior. Click the Window menu, and then click Behaviors to display the Behaviors panel. Click the element you want to add the Open Browser Window behavior; typically link text or graphic. Click the Add Behavior button (plus sign), and then click Open Browser Window. A dialog box appears, allowing you to set the details of the action. Type the URL or click Browse, select the URL from the Select File dialog box, and then click OK. Enter a window size (width and height in pixels). Select the check boxes with the window attributes you want to use. Enter a window name. The window name is used in the behavior script, so it cannot have any spaces or special characters. Click OK. To cha ng e th e tri gger, clic k th e event, click the Event list arrow, and then select the event you want. 10 9 8 7 6 5 4 3 2 1 1 3 4 2 8 5 9 7 6 10 From the Library of Wow! eBook ptg 364 Chapter 15 Dreamweaver provides several behaviors to display user text mes- sages, including Popup Message and Set Text. The Set Text behavior consists of four individual behaviors: Set Text of Container, Set Text of Frame, Set Text of Status Bar, and Set Text of Text Field. These behav- iors allow you to display text in an alert dialog box, a container, specific frame, text field, or the Status bar. Displaying Text Messages Create a Popup Message Window Open the Web page you want to apply a behavior. Click the Window menu, and then click Behaviors to display the Behaviors panel. Click the element you want to add the Popup Message behavior. Click the Add Behavior button (plus sign), and then click Popup Message. A dialog box appears, allowing you to set the details of the action. Type the message you want. Click OK. To cha ng e th e tri gger, clic k th e event, click the Event list arrow, and then select the event you want. 7 6 5 4 3 2 1 1 4 2 3 6 5 7 From the Library of Wow! eBook ptg Chapter 15 Working with Behaviors 365 Create a Status Bar Message Open the Web page you want to apply a behavior. Click the Window menu, and then click Behaviors to display the Behaviors panel. Click the element you want to add a behavior. Click the Add Behavior button (plus sign), point to Set Text, and then click Set Text Of Status Bar. A dialog box appears, allowing you to set the details of the action. Type the message you want. Click OK. To cha ng e th e tri gger, clic k th e event, click the Event list arrow, and then select the event you want. 7 6 5 4 3 2 1 1 4 3 2 6 5 7 From the Library of Wow! eBook ptg 366 Chapter 15 The Preload Images behavior allows you to preload images when a Web page initially loads. This is useful when you want to swap images on mouse rollover buttons. The Preload Images behavior loads the rollover image when the page initially loads, so visitors will not experi- ence a delay while the image loads the first time a visitor points to the button. The Swap Images behavior allows you to swap one image for another when an event occurs. The most common use of this behavior is to create rollover buttons. Along with the Swap Image behavior, you can also use the Swap Image Restore behavior, which restores the images that were swapped by the Swap Image behavior. Preloading and Swapping Images Preload Images Open the Web page you want to apply a behavior. Click the Window menu, and then click Behaviors to display the Behaviors panel. Click the element or <body> tag in the tag selector for the entire page you want to add the Preload Images behavior. Click the Add Behavior button (plus sign), and then click Preload Images. A dialog box appears, allowing you to set the details of the action. Click Browse, locate and select the image you want to preload, and then click OK. Click the Add Items button (plus sign). To add mo re i ma ge s, repe at s te ps 5 and 6. Click OK. To cha ng e th e tri gger, clic k th e event, click the Event list arrow, and then select the event you want. 9 8 7 6 5 4 3 2 1 3 2 4 1 8 5 6 9 From the Library of Wow! eBook ptg Chapter 15 Working with Behaviors 367 Swap Images Open the Web page you want to apply a behavior. Click the Window menu, and then click Behaviors to display the Behaviors panel. Click the image you want to swap. Click the Add Behavior button (plus sign), and then click Swap Image. The selected image appears highlighted in the Swap Image dialog box. Click Browse, locate and select the image you want to swap it with, and then click OK. To ins er t a Pre lo ad Imag es behavior, select the Preload Images check box. To ins er t a Swa p Im ag e Re st or e behavior, select the Restore Images onMouseOut check box. To rem ov e a swa p, s el ec t an image in the list, and then delete the file and path in the Set Source To box . Click OK. To cha ng e th e tri gger, clic k th e event, click the Event list arrow, and then select the event you want. 10 9 8 7 6 5 4 3 2 1 3 2 4 1 7 8 6 9 5 10 From the Library of Wow! eBook . points to the button. The Swap Images behavior allows you to swap one image for another when an event occurs. The most common use of this behavior is to create rollover buttons. Along with the Swap. 15 Dreamweaver provides several behaviors to display user text mes- sages, including Popup Message and Set Text. The Set Text behavior consists of four individual behaviors: Set Text of Container,. other sites and pages, or you can create a set of interactive buttons for use on a standard HTML driven Web site. Whichever option you choose, the ability to direct a visitor to other Web sites

Ngày đăng: 02/07/2014, 21:20

TỪ KHÓA LIÊN QUAN