HTMLAreaElement: protocol プロパティ

Baseline Widely available

This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.

HTMLAreaElement.protocol プロパティは、 URL のプロトコルスキームを表す文字列で、最後の ':' を含みます。

文字列です。

エリアのリンクのプロトコルを取得

js
// <area id="myArea" href="https://developer.mozilla.org/en-US/HTMLAreaElement"> 要素が文書にあったとします。
const area = document.getElementById("myArea");
area.protocol; // 'https:' を返す

仕様書

Specification
HTML
# dom-hyperlink-protocol-dev

ブラウザーの互換性

Report problems with this compatibility data on GitHub
desktopmobile
Chrome
Edge
Firefox
Opera
Safari
Chrome Android
Firefox for Android
Opera Android
Safari on iOS
Samsung Internet
WebView Android
WebView on iOS
protocol

Legend

Tip: you can click/tap on a cell for more information.

Full support
Full support

関連情報