You are here: Reference > JavaScript > client-side > ActiveX > HtmlDlgSafeHelper objects > objects > blockFormats
blockFormats collection
Represents a collection of available block format tags.
Syntax:
Properties that reference the object:
| HtmlDlgSafeHelper.blockFormats |
Possible members:
Properties:
Returns an integer that specifies the number of available block format tags.
This property is read-only. |
Methods:
item (index) |
Returns the name of a block format tag by index.
Parameters:
Return value:
Returns a string that contains the name of the block format tag at the specified position.
|
Example HTML code 1:
This example illustrates the use of the blockFormats collection:
|
||||
<head> <script type="text/javascript"> function ShowBlockFormatTags () { var dlgHelper = document.getElementById ("dlgHelper"); if (dlgHelper.blockFormats) { // Internet Explorer var formatTags = ""; for (var i = 1; i <= dlgHelper.blockFormats.Count; i++) { formatTags += dlgHelper.blockFormats (i) + "\n"; } alert ("The number of block format tags is " + dlgHelper.blockFormats.Count); alert ("The list of block formats: \n" + formatTags); } else { alert ("Your browser doesn't support this example!"); } } </script> </head> <body> <object id="dlgHelper" classid="clsid:3050f819-98b5-11cf-bb82-00aa00bdce0b" width="0px" height="0px"></object> <button onclick="ShowBlockFormatTags ();">Show available block format tags!</button> </body> |
||||
|
||||
Did you find this example helpful?
|
External links:
User Contributed Comments