定義と使用法
プロトコルのプロパティセットまたはコロン(:)を含む現在のURLのプロトコルを返します。
プロトコルは、データをコンピュータ間で送信される方法を指定する標準です。
ブラウザのサポート
プロパティ | |||||
---|---|---|---|---|---|
protocol | はい | はい | はい | はい | はい |
構文
プロトコルのプロパティを返します:
location.protocol
プロトコルのプロパティを設定します。
location.protocol= protocol
プロパティ値
Value | Type | Description |
---|---|---|
protocol | String |
The protocol of the URL. Possible values:
|
技術的詳細
戻り値: | 結腸を含む現在のURLのプロトコルを表す文字列、(:) |
---|
