Retrieves a collection of all the system-supported fonts.
dhtml语法
[ oColl = ]
Dialog Helper.fonts |
[ oObject = ]
Dialog Helper.fonts(iIndex) |
DHTML可能的值
oColl | A collection of system-supported fonts.
|
oObject | Reference to an individual item in the array of elements contained by the object. |
iIndex | Required. Integer that specifies the zero-based index of the item to be returned. |
Members Table
The following table lists the members exposed by the
fonts
object. Click a tab on the left to choose the type of member you want to view.
Attributes/Properties
Property | Description |
---|
Count |
Retrieves the number of available block format tags. |
Methods
Method | Description |
---|
Item |
Retrieves a string that specifies the name of a block format tag. |
DHTML代码范例
The following example displays the total number of system fonts, and then displays a list of their names.
function testFonts()
{
var a=dlgHelper.fonts.count;
alert(a); //show total number of system fonts
for (i = 1;i < dlgHelper.fonts.count;i++)
{
var f= f + " " + dlgHelper.fonts(i)
}
alert(f); //show names of all system fonts
}
This feature requires Microsoft® Internet Explorer 6.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.
applies to