346
Chapter 17: Design
•
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.removeCSSStyle()
Availability
Dreamweaver 3.
Description
Removes the
CLASS
or
ID
attribute from the specified element, or removes the
SPAN
tag that
completely surrounds the specified element. This function is valid only for the active document.
Arguments
elementNode, {classOrID}
•
The
elementNode
argument is an element node in the DOM. If the
elementNode
argument is
specified as an empty string (" "), the function acts on the current selection.
•
The
classOrID
argument, which is optional, is the attribute that should be removed (either
"class"
or
"id"
). If the
classOrID
argument is not specified, it defaults to
"class"
. If no
CLASS
attribute is defined for the
elementNode
argument, the
SPAN
tag that surrounds the
elementNode
argument is removed.
Returns
Nothing.
000_DW_API_Print.book Page 346 Wednesday, August 20, 2003 9:14 AM
Содержание DREAMWEAVER MX 2004-DREAMWEAVER API
Страница 1: ...Dreamweaver API Reference...
Страница 24: ...24 Contents...
Страница 32: ......
Страница 70: ...70 Chapter 5 Fireworks Integration...
Страница 76: ...76 Chapter 6 Flash Integration...
Страница 116: ...116 Chapter 9 The JavaBeans API...
Страница 140: ......
Страница 152: ...152 Chapter 11 Application...
Страница 218: ...218 Chapter 12 Workspace...
Страница 248: ...248 Chapter 13 Site...
Страница 292: ...292 Chapter 14 Document...
Страница 378: ...378 Chapter 17 Design...
Страница 430: ...430 Chapter 18 Code...
Страница 486: ...486 Index...