-
Notifications
You must be signed in to change notification settings - Fork 8.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
--- | ||
title: "HTMLButtonElement: value プロパティ" | ||
short-title: value | ||
slug: Web/API/HTMLButtonElement/value | ||
l10n: | ||
sourceCommit: 2b29051262aa05ce9a630d0dd2d6958f493abe19 | ||
--- | ||
|
||
{{ APIRef("HTML DOM") }} | ||
|
||
**`value`** は {{DOMxRef("HTMLButtonElement")}} インターフェイスのプロパティで、この {{htmlelement("button")}} 要素の現在の値を文字列で表します。値が設定されていない場合は空文字列になります。これはこの要素の [`value`](/ja/docs/Web/HTML/Element/button#value) 属性を反映します。 | ||
|
||
## 値 | ||
|
||
この {{htmlelement("button")}} 要素の値を含む文字列です。 | ||
|
||
## 例 | ||
|
||
```js | ||
const buttonElement = document.getElementById("given-name"); | ||
console.log(`value: ${buttonElement.value}`); | ||
``` | ||
|
||
## 仕様書 | ||
|
||
{{Specifications}} | ||
|
||
## ブラウザーの互換性 | ||
|
||
{{Compat}} | ||
|
||
## 関連情報 | ||
|
||
- {{HTMLElement("button")}} | ||
- {{DOMXref("HTMLButtonElement.type")}} | ||
- {{DOMXref("HTMLButtonElement.labels")}} |