/ref_m-q.htm#parsefloat_method">parsefloat, parseint functions
italics method
causes a string to be italicized as if it were in an <i> tag.
语法
stringname.italics()
stringname is any string or a property of an existing object.
method of
描述
use the italics method with the write or writeln methods to format and display a string in a document.
例子
the following example uses string methods to change the formatting of a string:var worldstring="hello, world"
document.write(worldstring.blink())
document.write("<p>" + worldstring.bold())
document.write("<p>" + worldstring.italics())
document.write("<p>" + worldstring.strike())
the previous example produces the same output as the following htm:
<blink>hello, world</blink> <p><b>hello, world</b> <p><i>hello, world</i> <p><strike>hello, world</strike>