tailieunhanh - dreamweaver cs5 all in one for dummies phần 6

Nếu bạn có một phong cách trang hiện tại bên ngoài (có thể là một bản sao của một trong những được sử dụng trên một dự án hoặc được cung cấp bởi một thành viên của nhóm của bạn) hoặc muốn sử dụng một trong Dreamweaver trong trang tạo ra (bằng cách chọn dán và lựa chọn nhập khẩu), hoặc như một dọn dẹp mã cuối cùng (với Dreamweaver HTML / XHTML Clean Up, | Set Text of Container Behavior 415 To begin using this behavior you must start with at least one container with an ID on the page. For instance you may want to apply this behavior to an AP Div layer. See Book IV Chapter 1 to learn more about working with layers . To attach the Set Text of Container behavior to a page follow these steps 1. Select a container on your page. 2. Click the Add Behavior icon in the Behaviors panel and then choose Set Text Set Text of Container. The Set Text of Container dialog box appears as shown in Figure 2-14. Figure 2-14 Change the text in a container. 3. In the Container menu select the target container. The target container is the container where the new content is displayed. If the container you want to target isn t listed your target doesn t yet have an ID attribute. Close the dialog box give your container an ID with the Properties inspector and start over at Step 1. 4. In the New HTML text box type or paste the replacement HTML content for the targeted container. Enter any HTML including valid JavaScript and formatting code. When no formatting is entered with the New HTML text the original text color and background color of the container is applied to the new text content. 5. Click OK to close the dialog box. 6. Verify that the event handler listed in the Events column of the Behaviors panel is the one you want to use. The default event handler for this behavior is onFocus. Book IV Chapter 2 JavaScript Behaviors and Spry Widgets 416 Set Text of Frame Behavior Set Text of Frame Behavior The Set Text of Frame behavior works exclusively with framesets and allows you to replace text or HTML content in a frame with a specified action. The HTML replacement content can include any JavaScript property global variable function call or other valid expression embedded in the text as long as it s embedded in braces . To display a brace type it with a backslash like this . By allowing you to change the content on a page inside a frame this .