文字
分享


fixed 方法

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

strVariable.fixed( )

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

说明

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

1

2

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

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

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

1

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

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

要求

版本 1

请参阅

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

应用于: String 对象

上一篇:F-I下一篇:floor 方法