protocol

リンクオブジェクトのプロトコル(スキーム)を返します。

構文

リンクオブジェクト.protocol

例文

<html>
 <head>
  <title>protocol</title>
  <script type="text/javascript"><!--
   window.onload = function() {
    var txt = document.links[0].protocol;
    document.getElementById("result").innerHTML = txt;
   }
  // --></script>
 </head>
 <body>
 <ul>
 <li><a href="http://www.openspc2.org:8080/JavaScript/index.html">OpenSpace</a>
 </ul>
 <div id="result"></div>
 </body>
</html>

関連記事

スポンサーリンク

Write - 文章を整形出力

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

上に戻る