Sets or retrieves the current typeface family.
dhtml语法
HTML | <ELEMENT FACE
= sTypeface... >
|
---|
Scripting | object.face [ = sTypeface ] |
---|
DHTML可能的值
sTypeface | String that
specifies or receives the typeface family. |
The property is read/write.
The property has no default value.
Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.
DHTML代码范例
This example sets the typeface family using the FACE attribute and the face property.
<FONT FACE="Arial" ID=oFont>
:
<SCRIPT>
alert(oFont.face + "\n" + "When you click this, the font will change");
oFont.face = 'Courier';
alert(oFont.face + "\n" + "The font has changed.");
</SCRIPT>
This feature requires Microsoft® Internet Explorer 4.0 or later. Click the following icon to install the latest version. Then reload this page to view the sample.

是否符合公共标准
This property is deprecated in
HTML
and
is defined in
World Wide Web Consortium (W3C) Document Object Model (DOM) Level 1
.
Applies To
更多语法参考
fontFamily