★ wanayoo — archive 1999 https://developer.mozilla.org/zh-CN/docs/Web/JavaScript/Reference/Global_Objects/Number/prototypeNouvelle recherche | Portail wanayoo

U.S. visitors: Help Mozilla protect Net Neutrality by signing our petition to Congress (http://mzl.la/nnpetition) on Wednesday, September 10th! See our blog post to learn more: https://blog.mozilla.org/netpolicy/2014/09/04/a-day-of-action-to-protect-net-neutrality/

mozilla
您的搜索结果

    Number.prototype

    概述

    Number.prototype 属性表示 Number 构造函数的原型。

    Property attributes of Number.prototype
    Writable no
    Enumerable no
    Configurable no

    描述

    所有 Number 实例都继承自 Number.prototype。修改 Number 构造函数的原型对象会影响到所有 Number 实例。.

    属性

    constructor
    返回创建该实例对象的构造函数。默认为 Number 对象。
    Properties inherited from Object:

    方法

    Number.prototype.toExponential()
    返回一个使用指数表示法表示的该数值的字符串表示。
    Number.prototype.toFixed()
    返回一个使用定点表示法表示的该数值的字符串表示。
    Number.prototype.toLocaleString()
    返回一个与语言相关的该数值对象的字符串表示。覆盖了Object.prototype.toLocaleString() 方法。
    Number.prototype.toPrecision()
    使用定点表示法或指数表示法来表示的指定显示位数的该数值对象的字符串表示。
    Number.prototype.toSource()
    Returns an object literal representing the specified Number object; you can use this value to create a new object. Overrides the Object.prototype.toSource() method.
    Number.prototype.toString()
    返回一个表示该数值对象的字符串。覆盖了 Object.prototype.toString() 方法。
    Number.prototype.valueOf()
    返回该数值对象的原始值。覆盖了 Object.prototype.valueOf() 方法。
     

    规范

    规范版本 规范状态 注解
    ECMAScript 1st Edition. Implemented in JavaScript 1.1 Standard Initial definition.
    ECMAScript 5.1 (ECMA-262)
    Number
    Standard  
    ECMAScript 6 (ECMA-262)
    Number
    Draft  

    浏览器兼容性

    Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari
    Basic support (Yes) (Yes) (Yes) (Yes) (Yes)
    Feature Android Chrome for Android Firefox Mobile (Gecko) IE Mobile Opera Mobile Safari Mobile
    Basic support (Yes) (Yes) (Yes) (Yes) (Yes) (Yes)

     

    文档标签和贡献者

    对本页有贡献的人: AlexChao
    最后编辑者: AlexChao,