Share via


fontsize 方法

更新:2007 年 11 月

傳回一個在 String 物件中文字旁邊具有 SIZE 屬性 (Attribute) 的 HTML <FONT> 標記的字串。

 function fontsize(intSize : Number) : String

引數

  • intSize
    必要項。指定文字大小的整數值。

備註

整數值是否有效需視 Microsoft JScript 主應用程式而定。如需詳細資訊,請參閱您的主應用程式文件。

未檢查標記是否已套用至字串。

範例

以下範例說明如何使用 fontsize 方法:

var strVariable = "This is a string";
strVariable = strVariable.fontsize(-1);

在最後一個陳述式之後,strVariable 的值為:

<FONT SIZE="-1">This is a string</FONT>

需求

1 版

套用至:

String 物件

請參閱

參考

fontcolor 方法