location.protocol

プロトコル(スキーム)を返します。

構文

location.protocol

例文

<html>
 <head>
  <title>location.protocol</title>
  <script type="text/javascript"><!--
  window.onload = function () {
   document.getElementById("result").innerHTML = location.protocol;
  }
  // --></script>
 </head>
 <body>
 <div id="result"></div>
 </body>
</html>

関連記事

スポンサーリンク

画像が含まれる要素にline-heightを指定すると画像のレイアウトが狂う

ホームページ製作・web系アプリ系の製作案件募集中です。

上に戻る