aboutsummaryrefslogtreecommitdiff
path: root/files/zh-cn/web/html/global_attributes/x-ms-format-detection/index.html
blob: cc41b27d6a33724990f526b53b0689386523edaa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
---
title: x-ms-格式 - 检测
slug: Web/HTML/Global_attributes/x-ms-format-detection
tags:
  - HTML
  - x-ms-format-detection
  - 参考
  - 属性
translation_of: Web/HTML/Global_attributes/x-ms-format-detection
original_slug: Web/HTML/Global_attributes/x-ms-格式 - 检测
---
<div>{{HTMLSidebar("Global_attributes")}}{{Non-standard_Header}}</div>

<p>这个 <code><strong>x-ms-format-detection</strong></code> 属性确定元素文本中的数据格式 (如电话号码) 是否自动转换为可跟踪链接。</p>

<p>现有的链接 (例如带有<code>tel:</code> 计划不受影响。</p>

<div class="blockIndicator note">
<p>通过格式检测创建的链接不会出现在 DOM 中。</p>
</div>

<p>{{Non-standard_inline}} 此专有属性是特定于 Internet Explorer 和 Microsoft Edge。</p>

<h2 id="语法">语法</h2>

<pre class="brush: html">&lt;html x-ms-format-detection="none"&gt;
</pre>

<h2 id="价值">价值</h2>

<dl>
 <dt><code>all</code></dt>
 <dd>检测所有受支持的数据格式。</dd>
 <dt><code>none</code></dt>
 <dd>关闭格式检测。</dd>
 <dt><code>phone</code></dt>
 <dd>电话号码模式是自动链接的。</dd>
</dl>

<h2 id="另请详见">另请详见</h2>

<ul>
 <li><a href="/en-US/docs/Web/API/Microsoft_API_extensions">Microsoft API extensions</a></li>
</ul>