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>
関連記事
スポンサーリンク