只读 region 特性为 PaymentAddress interface returns a string containing the top-level administrative subdivision of the country in which the address is located. For example, this may be a state, province, oblast, or prefecture.

句法

var paymentRegion = PaymentAddress.region;
					

A DOMString specifying the top-level administrative subdivision within the country in which the address is located. This region has different names in different countries, such as: state, province, oblast, prefecture, or county.

用法注意事项

In some countries, like Belgium, it's uncommon for people to provide a region as part of their postal address. In such cases, the browser returns an empty string as the value of region . However, the address should still be acceptable to use for its intended purpose (e.g., to ship a product). However, always verify addresses to make sure what the user provides is usable.

规范

规范 状态 注释
支付请求 API
The definition of 'PaymentAddress.region' in that specification.
候选推荐 初始定义。

浏览器兼容性

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
region Chrome 61 Disabled
61 Disabled
Disabled ). To change preferences in Chrome, visit
Edge 15 Firefox 56 注意事项 Disabled
56 注意事项 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 Yes WebView Android 不支持 No Chrome Android 53 Disabled
53 Disabled
Disabled ). To change preferences in Chrome, visit
Firefox Android 56 注意事项 Disabled
56 注意事项 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 Yes 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