Adobe Dreamweaver CS3 Bedienungsanleitung Seite 358

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 738
  • Inhaltsverzeichnis
  • FEHLERBEHEBUNG
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 357
DREAMWEAVER CS3
User Guide
351
2 Type the exact JavaScript to be executed, or type the name of a function.
For example, to create a Back button, you might type
if (history.length > 0){history.back()}.Ifyouhave
encapsulated your code in a function, type only the function name (for example,
hGoBack()).
3 Click OK and verify that the default event is correct. If not, select another event or change the target browser in
the Show Events For submenu.
Apply the Change Property behavior
UsetheChangePropertybehaviortochangethevalueofoneofanobjectsproperties(forexample,thebackground
color of a div or the action of a form).
Note: Use this behavior only if you are very familiar with HTML and JavaScript.
1 Select an object and choose Change Property from the Actions menu of the Behaviors panel.
2 From the Type Of Element menu, select an element type to display all the identified elements of that type.
3 Select an element from the Element ID menu.
4 Select a property from the Property menu, or enter the name of the property in the box.
5 Enter the new value for the new property in the New Value field.
6 Click OK and verify that the default event is correct. If not, select another event or change the target browser in
the Show Events For submenu.
Apply the Check Browser behavior
Note: This behavior is deprecated as of Dreamweaver 9. To access it, you must select the ~Deprecated menu item from
the Actions menu of the Behaviors panel.
Use the Check Browser behavior to send visitors to different pages depending on their browser brands and versions.
For example, you may want to send visitors using Netscape Navigator 4.0 to a different page than visitors using
Internet Explorer 4.0.
It’s useful to attach this behavior to the
<body> tag of a page that is compatible with practically any browser (and that
does not use any other JavaScript); this way, visitors who come to the page with JavaScript turned off will still see
something.
Another option is to attach this behavior to a null link (such as
<a href="javascript:;">) and have the action
determine the links destination based on the visitor’s browser brand and version.
1 Select an object and choose ~Deprecated > Check Browser from the Actions menu of the Behaviors panel.
2 Determine how you want to separate your visitors: by browser brand, by browser version, or both.
3 Specify a version of Netscape Navigator.
4 In the adjacent pop-up menus, select destination options (Go To URL, Go To Alt URL, or Stay On This Page.)
Here, you specify what to do if the browser is the Netscape Navigator version you specified or later and what to do
otherwise.
5 Specify a version of Internet Explorer and select destination options as you did in step 4.
6 Select an option from the Other Browsers menu to specify what to do if the browser is neither Netscape Navigator
nor Internet Explorer.
StayOnThisPageisthebestoptionforbrowsersotherthanNetscapeNavigatorandInternetExplorerbecausemost
do not support JavaScript—and if they cannot read this behavior, they will stay on the page anyway.
September 4, 2007
Seitenansicht 357
1 2 ... 353 354 355 356 357 358 359 360 361 362 363 ... 737 738

Kommentare zu diesen Handbüchern

Keine Kommentare