--- title: DOMStringMap slug: Web/API/DOMStringMap tags: - API - DOM - 参考 - 接口 translation_of: Web/API/DOMStringMap --- <div>{{ APIRef("HTML DOM") }}</div> <p><strong><code>DOMStringMap</code></strong> 接口在 {{ domxref("HTMLElement.dataset") }} 属性中被用到,被用于容纳和展示元素的自定义属性。</p> <h2 id="规范">规范</h2> <table class="standard-table"> <thead> <tr> <th scope="col">规范</th> <th scope="col">状态</th> <th scope="col">备注</th> </tr> </thead> <tbody> <tr> <td>{{SpecName('HTML WHATWG', "dom.html#domstringmap", "DOMStringMap")}}</td> <td>{{Spec2('HTML WHATWG')}}</td> <td></td> </tr> </tbody> </table> <h2 id="浏览器兼容性">浏览器兼容性</h2> <p>{{Compat("api.DOMStringMap")}}</p> <h2 id="参见">参见</h2> <ul> <li>{{ domxref("HTMLElement.dataset") }}</li> <li>HTML <a href="/zh-CN/docs/Web/HTML/Global_attributes">全局属性</a>中的 <a href="/zh-CN/docs/Web/HTML/Global_attributes#attr-data-*">data-*</a></li> </ul>