Macromedia dreamweaver 8-using dreamweaver 用户手册
Using the behavior actions that come with Dreamweaver
513
Example
The URL for this page is {window.location}, and today is {new Date()}.
To use the Popup Message action:
1.
Select an object and open the Behaviors panel.
2.
Click the Plus (+) button and select Popup Message from the Actions pop-up menu.
3.
Enter your message in the Message text box.
4.
Click OK.
5.
Check that the default event is the one you want.
If it isn’t, select another event from the pop-up menu. If the events you want are not listed,
change the target browser in the Show Events For pop-up menu.
change the target browser in the Show Events For pop-up menu.
Preload Images
The Preload Images action loads images that do not appear on the page right away (such as
those that will be swapped in with behaviors or JavaScript) into the browser cache. This
prevents delays caused by downloading when it is time for the images to appear.
those that will be swapped in with behaviors or JavaScript) into the browser cache. This
prevents delays caused by downloading when it is time for the images to appear.
To use the Preload Images action:
1.
Select an object and open the Behaviors panel.
2.
Click the Plus (+) button and select Preload Images from the Actions pop-up menu.
3.
Click Browse to select an image file to preload, or enter the path and filename of an image
in the Image Source File text box.
in the Image Source File text box.
4.
Click the Plus (+) button at the top of the dialog box to add the image to the Preload
Images list.
Images list.
5.
Repeat steps 3 and 4 for all remaining images that you want to preload on the current page.
NO
TE
You can’t control how the JavaScript alert looks; that’s determined by the visitor’s
browser. If you want more control over the appearance of your message, consider using
the Open Browser Window behavior. For detailed information, see
browser. If you want more control over the appearance of your message, consider using
the Open Browser Window behavior. For detailed information, see
NO
TE
The Swap Image action automatically preloads all highlight images when you select the
Preload Images option in the Swap Image dialog box, so you do not need to manually
add Preload Images when using Swap Image.
Preload Images option in the Swap Image dialog box, so you do not need to manually
add Preload Images when using Swap Image.
NO
TE
If you do not click the Plus button before entering the next image, the image you have
just chosen will be replaced in the list with the image you select next.
just chosen will be replaced in the list with the image you select next.