--- 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"><html x-ms-format-detection="none"> </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>