URL
インターフェイスの hash
プロパティは、'#'
の後に URL のフラグメント識別子が続く USVString
を返します。
フラグメントはパーセントデコードされていません。 URL にフラグメント識別子がない場合、このプロパティには空の文字列 ""
が含まれます。
註: この機能は Web Workers 内で利用可能です。
構文
string = object.hash; object.hash = string;
値
例
var url = new URL('https://developer.mozilla.org/en-US/docs/Web/API/URL/href#Examples');
url.hash // '#Examples' を返します
仕様
仕様 | 状態 | コメント |
---|---|---|
URL URL.hash の定義 |
現行の標準 | 初期定義 |
ブラウザーの互換性
BCD tables only load in the browser
The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request.
関連情報
URL
インターフェイスに属します。