Adobe Dreamweaver API Reference CS5 Uživatelský manuál Strana 387

  • Stažení
  • Přidat do mých příruček
  • Tisk
  • Strana
    / 533
  • Tabulka s obsahem
  • KNIHY
  • Hodnocené. / 5. Na základě hodnocení zákazníků
Zobrazit stránku 386
382
DREAMWEAVER API REFERENCE
Design
Last updated 8/27/2013
Arguments
elementNode, styleName, {classOrID}, {bForceNesting}
The elementNode argument is an element node in the DOM. If the elementNode argument is a null value or an
empty string (
""), the function acts on the current selection.
The styleName argument is the name of a CSS style.
The classOrID argument, which is optional, is the attribute with which the style should be applied (either "class"
or
"id"). If the elementNode argument is a null value or an empty string and no tag exactly surrounds the selection,
the style is applied using
SPAN tags. If the selection is an insertion point, Dreamweaver uses heuristics to determine
to which tag the style should be applied.
The bForceNesting argument, which is optional, is a Boolean value, which indicates whether nesting is allowed. If
the bForceNesting flag is specified, Dreamweaver inserts a new
SPAN tag instead of trying to modify the existing tags
in the document. This argument defaults to a
false value if it is not specified.
Returns
Nothing.
Example
The following code applies the red style to the selection, either by surrounding the selection with SPAN tags or by
applying a
CLASS attribute to the tag that surrounds the selection:
var theDOM = dreamweaver.getDocumentDOM('document');
theDOM.applyCSSStyle('','red');
dom.getElementView()
Availability
Dreamweaver 8.
Description
This function gets the Element view for the currently selected element in the document. If the currently selected
element is normal, the
getElementView() function looks for the selected element’s first ancestor that is either full or
hidden.
Arguments
None.
Returns
A string that indicates the status of the selected element. Values include:
"hidden", which indicates that the element has CSS properties that may cause content to be partially or completely
hidden in Design view. Supported CSS properties include:
overflow: hidden, scroll, or auto
display: none
"full", which indicates that the element is "hidden" by default, but is currently in "full" view as set by the
setElementView("full") function.
"normal", which indicates that the element is neither "hidden" nor "full".
Zobrazit stránku 386
1 2 ... 382 383 384 385 386 387 388 389 390 391 392 ... 532 533

Komentáře k této Příručce

Žádné komentáře