在线文档教程

Intl.Collator.prototype

Intl.Collator.prototype

Intl.Collator.prototype属性表示Intl.Collator构造函数的原型对象。

| Intl.Collat​​or.prototype的属性|

|:----|

| Writable | no |

| Enumerable | no |

| Configurable | no |

描述

请参阅有关实例Collator,来了解Intl.Collator示例。

Intl.Collator实例继承自Intl.Collator.prototype。原型对象的修改被所有Intl.Collator实例继承。

属性

Intl.Collator.prototype.compare Getter; 返回一个根据这个Intl.Collator对象的排序顺序比较两个字符串的函数。Intl.Collator.prototype.constructor参考Intl.Collator

方法

Intl.Collator.prototype.resolvedOptions()返回一个新对象,这些属性反映在对象初始化期间计算的区域设置和排序规则。

规范

SpecificationStatusComment
ECMAScript Internationalization API 1.0 (ECMA-402)The definition of 'Intl.Collator.prototype' in that specification.StandardInitial definition.
ECMAScript Internationalization API 2.0 (ECMA-402)The definition of 'Intl.Collator.prototype' in that specification.Standard
ECMAScript Internationalization API 4.0 (ECMA-402)The definition of 'Intl.Collator.prototype' in that specification.Draft

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari (WebKit)
Basic support24(Yes)29 (29)1115No support

FeatureAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE PhoneOpera MobileSafari Mobile
Basic supportNo support26(Yes)56.0 (56)No supportNo supportNo support