NumberPrototype.toFixed(Object, Double) 方法

定義

建立指定的字串表示 NumberObject ,顯示指定的十進位數字。

此 API 支援此產品基礎結構,但無法直接用於程式碼之中。

public:
 static System::String ^ toFixed(System::Object ^ thisob, double fractionDigits);
[Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Number_toFixed)]
public static string toFixed(object thisob, double fractionDigits);
[<Microsoft.JScript.JSFunction(Microsoft.JScript.JSFunctionAttributeEnum.HasThisObject, Microsoft.JScript.JSBuiltin.Number_toFixed)>]
static member toFixed : obj * double -> string
Public Shared Function toFixed (thisob As Object, fractionDigits As Double) As String

參數

thisob
Object

這個方法作用的對象。

fractionDigits
Double

一個介於 0 到 20 之間的數字,代表要顯示的小數點數。 預設值是 0。

傳回

的字串表示 thisob

屬性

適用於

另請參閱