HTMLHyperlinkElementUtils.hash
HTMLHyperlinkElementUtils.hash
プロパティは、'#'
の後に URL のフラグメント識別子が続く USVString
を返します。
フラグメントはパーセントデコードされていません。 URL にフラグメント識別子がない場合、このプロパティには空の文字列 ""
が含まれます。
構文
string = object.hash; object.hash = string;
例
<a id="myAnchor" href="/en-US/docs/HTMLHyperlinkElementUtils.href#Examples">Examples</a>
<script>
var anchor = document.getElementById("myAnchor");
console.log(anchor.hash); // 戻り値は '#Examples'
</script>
仕様
仕様 | 状態 | コメント |
---|---|---|
HTML Living Standard HTMLHyperlinkElementUtils.hash の定義 |
現行の標準 | 初期定義 |
ブラウザーの互換性
No compatibility data found for api.HTMLHyperlinkElementUtils.hash
.
Check for problems with this page or contribute missing data to mdn/browser-compat-data.
関連情報
HTMLHyperlinkElementUtils
ミックスインに属します。