MACROMEDIA DREAMWEAVER 8-DREAMWEAVER API Dokumentacja Strona 71

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 692
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 70
Menu Commands 71
Returns
Dreamweaver expects nothing.
Example
function receiveArguments()
{
var styleName = arguments[0];
if (styleName == "(None)")
dw.getDocumentDOM(’document’).applyCSSStyle(’’,’’);
else
dw.getDocumentDOM(’document’).applyCSSStyle(’’,styleName);
}
setMenuText()
Description
Specifies the text that should appear in the menu.
Note: Do not use this function if you are using “getDynamicContent()” on page 69.
Arguments
{arg1}, {arg2},...{argN}
If the arguments attribute is defined for a menuitem tag, the value of that attribute passes to the
setMenuText() function (and to the “canAcceptCommand()” on page 68,
“isCommandChecked()” on page 70, and “receiveArguments()” on page 70 functions) as
one or more arguments. The
arguments attribute is useful for distinguishing between two menu
items that call the same menu command.
Returns
Dreamweaver expects the string that should appear in the menu.
Example
function setMenuText()
{
if (arguments.length != 1) return "";
var whatToDo = arguments[0];
if (whatToDo == "undo")
return dw.getUndoText();
else if (whatToDo == "redo")
return dw.getRedoText();
else return "";
}
Przeglądanie stron 70
1 2 ... 66 67 68 69 70 71 72 73 74 75 76 ... 691 692

Komentarze do niniejszej Instrukcji

Brak uwag