MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Spezifikationen Seite 74

  • Herunterladen
  • Zu meinen Handbüchern hinzufügen
  • Drucken
  • Seite
    / 692
  • Inhaltsverzeichnis
  • LESEZEICHEN
  • Bewertet. / 5. Basierend auf Kundenbewertungen
Seitenansicht 73
Chapter 774
In this command, the receiveArguments() function processes the arguments and executes the
command. More complex menu commands might call different functions to execute the
command. For example, the following code checks whether the first argument is
"foo"; if it is, it
calls the
doOperationX() function and passes it the second argument. If the first argument is
"bar", it calls the doOperationY() function and passes it the second argument.
doOperationX() or doOperationY() is responsible for executing the command.
function receiveArguments(){
if (arguments.length != 2) return;
var whatToDo = arguments[0];
if (whatToDo == "foo"){
doOperationX(arguments[1]);
}else if (whatToDo == "bar"){
doOperationX(arguments[1]);
}
}
Seitenansicht 73
1 2 ... 69 70 71 72 73 74 75 76 77 78 79 ... 691 692

Kommentare zu diesen Handbüchern

Keine Kommentare