范围错误:form 必须是 'NFC'、'NFD'、'NFKC' 或 'NFKD' 之一
当无法识别的字符串传递给 String.prototype.normalize() 方法时,会发生 JavaScript 异常 "form 必须是 'NFC'、'NFD'、'NFKC' 或 'NFKD' 之一"。
¥The JavaScript exception "form must be one of 'NFC', 'NFD', 'NFKC', or 'NFKD'" occurs when an unrecognized string is passed to the String.prototype.normalize() method.
信息
错误类型
什么地方出了错?
¥What went wrong?
String.prototype.normalize() 方法仅接受以下四个值作为其 form 参数:"NFC"、"NFD"、"NFKC" 或 "NFKD"。如果传递任何其他值,则会抛出错误。阅读 normalize() 的参考资料以了解不同的规范化形式。
¥The String.prototype.normalize() method only accepts the following four values as its form argument: "NFC", "NFD", "NFKC", or "NFKD". If you pass any other value, an error will be thrown. Read the reference of normalize() to learn about different normalization forms.
示例
无效案例
有效案例
也可以看看
¥See also