--- title: Number.prototype.toSource() slug: Web/JavaScript/Reference/Global_Objects/Number/toSource translation_of: Web/JavaScript/Reference/Global_Objects/Number/toSource ---
{{JSRef("Global_Objects", "Number")}} {{ Non-standard_header() }}

概述

toSource() 方法返回该对象源码的字符串表示。

语法

numObj.toSource();
Number.toSource();

参数

描述

toSource() 方法返回下列值:

function Number() { [native code] }

该方法通常被 JavaScript 内部调用,而不是在代码中显示调用。

规范

不是任何标准的一部分。在 JavaScript 1.3 被实现。

浏览器兼容性

{{Compat}}

相关链接