Adobe Dreamweaver API Reference CS5 Manuale Utente Pagina 348

  • Scaricare
  • Aggiungi ai miei manuali
  • Stampa
  • Pagina
    / 533
  • Indice
  • SEGNALIBRI
  • Valutato. / 5. Basato su recensioni clienti
Vedere la pagina 347
343
DREAMWEAVER API REFERENCE
Page content
Last updated 8/27/2013
Arguments
None.
Returns
An array of element nodes.
Example
[...]
var DOM = dw.getDocumentDOM();
// get all the UL, OL, and DL elements in the document.
var lists = DOM.getListElements();
var props = null;
for (var i=0; i < lists.length; i++){
props = window.getDeclaredStyle(lists[i]);
if ((props.cssFloat == "left" || props.cssFloat == "right") && props.overflow == "auto"){
// do something
}
}
[...]
elem.isBlockElement()
Availability
Dreamweaver CS3.
Description
Checks whether the element has an inherent or specified display value of 'block'.
Arguments
None.
Returns
A Boolean value indicating whether the object is a block-level element.
Example
[...]
var DOM = dw.getDocumentDOM();
var blocks = DOM.body.getBlockElements();
var next = null;
for (var i=0; i < blocks.length; i++){
// next is the node right after blocks[i]
next = blocks[i].nextSibling;
// if next isn't null AND next is an element node AND next is a block element,
// we've met the "second of two consecutive block elements" test.
if (next && (next.nodeType == 1) && next.isBlockElement()){
// do something
}
}
[...]
Vedere la pagina 347
1 2 ... 343 344 345 346 347 348 349 350 351 352 353 ... 532 533

Commenti su questo manuale

Nessun commento