HBCMS更多的中文手册参考:

font-style Attribute | fontStyle参数属性

DHTML文档教程

Sets or retrieves the font style of the object as italic, normal, or oblique.

dhtml语法

HTML { font-style : sStyle }
Scriptingobject.style.fontStyle [ = sStyle ]

DHTML可能的值

sStyleString that specifies or receives one of the following values.
normalDefault. Font is normal.
italicFont is italic.
obliqueFont is italic.

The property is read/write for all objects except the following, for which it is read-only: currentStyle. The property has a default value of normal. The Cascading Style Sheets (CSS) attribute is inherited.

Expressions can be used in place of the preceding value(s), as of Microsoft® Internet Explorer 5. For more information, see about dynamic properties.

remarks

the oblique value is available as of microsoft® internet explorer 4.0. internet explorer 4.0 renders italic and oblique identically.

while, internet explorer is shipped with a default fontstyle, this default can be changed by accessing internet options.

Examples

The following example shows how to use hn as a selector to set the font style to italic in h3 headings.

<STYLE>
H3 { font-style:italic }
</STYLE>
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.

The following example shows how to use inline scripting to set the font style to italic when an onmousedown event occurs.

<div onmousedown="this.style.fontstyle='italic'"> 
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 defined in Cascading Style Sheets (CSS), Level 1 (CSS1) Non-Microsoft link.

Applies To

A, ADDRESS, B, BIG, BLOCKQUOTE, BODY, BUTTON, CAPTION, CENTER, CITE, CODE, COL, COLGROUP, currentStyle, CUSTOM, DD, defaults, DFN, DIR, DIV, DL, DT, EM, FIELDSET, FORM, hn, HTML, I, IMG, INPUT type=button, INPUT type=checkbox, INPUT type=file, INPUT type=image, INPUT type=password, INPUT type=radio, INPUT type=reset, INPUT type=submit, INPUT type=text, ISINDEX, KBD, LABEL, LEGEND, LI, LISTING, MARQUEE, MENU, OL, P, PLAINTEXT, PRE, runtimeStyle, S, SAMP, SELECT, SMALL, SPAN, STRIKE, STRONG, style, SUB, SUP, TABLE, TBODY, TD, TEXTAREA, TFOOT, TH, THEAD, TR, TT, U, UL, VAR, XMP

更多语法参考

font