document.domain

ドメイン名を返します。

構文

document.domain

例文

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

関連記事

スポンサーリンク

{html_image}関数 HTML<img>タグを作成する

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

上に戻る