在线文档教程

Symbol.search

Symbol.search

Symbol.search公知的符号指定一个返回该正则表达式相匹配的字符串中的索引的方法。该功能由该String.prototype.search()方法调用。

有关更多信息,请参阅RegExp.prototype[@@search]()String.prototype.search()

| Symbol.search 属性的属性特性:|

|:----|

| Writable | no |

| Enumerable | no |

| Configurable | no |

规范

SpecificationStatusComment
ECMAScript 2015 (6th Edition, ECMA-262)The definition of 'Symbol.search' in that specification.StandardInitial definition.
ECMAScript Latest Draft (ECMA-262)The definition of 'Symbol.search' in that specification.Living Standard

浏览器兼容性

FeatureChromeEdgeFirefox (Gecko)Internet ExplorerOperaSafari
Basic support50(Yes)49 (49)No supportNo supportNo support

FeatureAndroidChrome for AndroidEdgeFirefox Mobile (Gecko)IE MobileOpera MobileSafari Mobile
Basic supportNo supportNo support(Yes)49.0 (49)No supportNo supportNo support