文字
分享


bold 方法

把 HTML <B> 标记放置在 String 对象中的文本两端。

strVariable.bold()

必选项 strVariable 参数可以是任意的 String 对象或文字。

说明

下面的示例说明了 bold 方法是如何工作的:

1

2

<code>var strVariable = "This is a string object";

strVariable = strVariable.<span class="cfe"><b>bold( )</b></span>;</code>

最后一条语句执行完后,strVariable 的值是:

1

<code><B>This is a string object</B></code>

不检查该标记是否已经被应用于该字符串了。

要求

版本 1

请参阅

italics 方法 | String 对象的方法 | String 对象的属性

应用于: String 对象

上一篇:blink 方法下一篇:call 方法