弃用
This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes. Avoid using it, and update existing code if possible; see the 兼容性表格 at the bottom of this page to guide your decision. Be aware that this feature may cease to work at any time.

languageCode 只读特性在 PaymentAddress interface returns a string containing the BCP-47 language code for the address. This is used while localizing the displayy of the address, allowing the determination of the field separators and the order of fields when formatting the address.

句法

var paymentLanguageCode = PaymentAddress.languageCode;
					

A DOMString providing the BCP-47 format language code indicating the language the address was written in, such as "en-US" , "pt-BR" ,或 "ja-JP" .

浏览器兼容性

The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. 更新 GitHub 上的兼容性数据
桌面 移动
Chrome Edge Firefox Internet Explorer Opera Safari Android webview Chrome for Android Firefox for Android Opera for Android Safari on iOS Samsung Internet
languageCode 弃用 非标 Chrome 61 Disabled
61 Disabled
Disabled ). To change preferences in Chrome, visit
Edge 15 Firefox 不支持 56 — 63 注意事项 Disabled
56 — 63 注意事项 Disabled
Available only in nightly builds. Requires the comma-delineated list in dom.payments.request.supportedRegions to contain one or more of the supported 2-character ISO locales, currently US and CA.
Disabled ). To change preferences in Firefox, visit about:config.
IE 不支持 No Opera 不支持 No Safari ? WebView Android 不支持 No Chrome Android 53 Disabled
53 Disabled
Disabled ). To change preferences in Chrome, visit
Firefox Android 不支持 56 — 63 注意事项 Disabled
56 — 63 注意事项 Disabled
Available only in nightly builds. Requires the comma-delineated list in dom.payments.request.supportedRegions to contain one or more of the supported 2-character ISO locales, currently US and CA.
Disabled ). To change preferences in Firefox, visit about:config.
Opera Android 不支持 No Safari iOS ? Samsung Internet Android 不支持 No

图例

完整支持

完整支持

不支持

不支持

兼容性未知 ?

兼容性未知

非标。预期跨浏览器支持较差。

弃用。不要用于新网站。

弃用。不要用于新网站。

见实现注意事项。

用户必须明确启用此特征。

用户必须明确启用此特征。

元数据

  • 最后修改:
  1. 支付请求 API
  2. PaymentAddress
  3. 特性
    1. addressLine
    2. city
    3. country
    4. dependentLocality
    5. organization
    6. phone
    7. postalCode
    8. recipient
    9. region
    10. regionCode
    11. sortingCode
    12. toJSON()
  4. Related pages for Payment Request API
    1. HTMLIFrameElement.allowPaymentRequest
    2. MerchantValidationEvent
    3. PaymentMethodChangeEvent
    4. PaymentRequest
    5. PaymentRequestUpdateEvent
    6. PaymentResponse

版权所有  © 2014-2026 乐数软件    

工业和信息化部: 粤ICP备14079481号-1