Javascript Reference
Categories: Dialog Helper

javascript Dialog Helper blockFormats

@March 15, 2008, 1:22 a.m.
blockFormatsFirefox/Netscape/NN n/a IE 6 Chrome/Safari/DOM n/a  

Read-only  

Returns a collection of plain-language names of block-level elements supported by the browser. Unlike other IE collections, to read the number of items, you must access its Count property, rather than length property. The names of items returned are strings, such as "Heading 1" and "Numbered List" (corresponding to the h1 and ol elements, respectively). Access each item in the collection via the collection's item( ) method.

 
Example
 
var blockList = dlgHelper.blockFormats;
var blockNames = new Array( );
for (var i = 0; i < blockList.Count; i++) {
    blockNames[blockNames.length]= blockList.item(i);
}
 
Value

Array of strings

 
Default

Implementation-dependent.


Powered by Linode.