A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://developer.mozilla.org/ja/docs/Web/API/HTMLAreaElement/port below:

HTMLAreaElement: port プãƒãƒ‘ティ - Web API

HTMLAreaElement: port プロパティ

Baseline Widely available

port は HTMLAreaElement インターフェイスのプロパティで、 <area> 要素の href のポート番号が入った文字列です。ポートがプロトコルの既定値(ws: および http: の場合は 80、 wss: および https: の場合は 443、 ftp: の場合は 21)である場合、このプロパティは空文字列 ("") になります。

このプロパティを設定すると、URL のポート番号を変更できます。 URL にホストが存在しない場合、またはそのスキームが file: の場合、このプロパティを設定しても効果はありません。また、不正なポート番号は暗黙に無視されます。

詳しくは URL.port を参照してください。

値

文字列です。

例 エリアのリンクからポート番号を取得
// <area id="myArea" href="https://developer.mozilla.org:443/ja/docs/HTMLAreaElement"> 要素が文書にあったとします。
const area = document.getElementByID("myArea");
area.port; // '443' を返す
// もう一つの <area id="myArea" href="https://developer.mozilla.org:8888/ja/docs/HTMLAreaElement"> 要素が文書にあったとします。
const area = document.getElementByID("myArea");
area.port; // Returns:'8888'
仕様書 ブラウザーの互換性 関連情報

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4