blob: cc849ee54801290412be2bace0e8e672a65fa5fc (
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
45
|
---
title: HTMLDataElement.value
slug: Web/API/HTMLDataElement/value
translation_of: Web/API/HTMLDataElement/value
---
<p>{{APIRef("HTML DOM")}}</p>
<p>{{domxref("HTMLDataElement")}} 接口的 <strong><code>value</code></strong> 属性返回反映 {{htmlattrxref("value", "data")}} HTML 属性的{{domxref("DOMString")}} 。</p>
<h2 id="Syntax">Syntax</h2>
<pre class="syntaxbox">var <em>aValue</em> = <em>htmlDataElement</em>.<em>value</em>
<em>htmlDataElement</em>.<em>value</em> = <em>aValue</em></pre>
<h3 id="Value">Value</h3>
<p>A {{domxref("DOMString")}}.</p>
<h2 id="Specifications">Specifications</h2>
<table class="standard-table">
<tbody>
<tr>
<th scope="col">Specification</th>
<th scope="col">Status</th>
<th scope="col">Comment</th>
</tr>
<tr>
<td>{{SpecName('HTML WHATWG', "#dom-data-value", "HTMLDataElement.value")}}</td>
<td>{{Spec2('HTML WHATWG')}}</td>
<td></td>
</tr>
<tr>
<td>{{SpecName('HTML5 W3C','text-level-semantics.html#dom-data-value','value')}}</td>
<td>{{Spec2('HTML5 W3C')}}</td>
<td></td>
</tr>
</tbody>
</table>
<h2 id="Browser_compatibility">Browser compatibility</h2>
<div class="hidden">此页面中的兼容性表是由结构化数据生成的。如果您想提供数据,请查看 <a href="https://github.com/mdn/browser-compat-data">https://github.com/mdn/browser-compat-data</a> 并向我们发送 pull request。</div>
<p>{{Compat("api.HTMLDataElement.value")}}</p>
|