host
ホスト名を返します。ポート番号が指定されている場合、FirefoxとiCab 3以降ではポート番号が付加された文字列を返します。
構文
リンクオブジェクト.host
例文
<html> <head> <title>host</title> <script type="text/javascript"><!-- window.onload = function() { var txt = document.links[0].host; document.getElementById("result").innerHTML = txt; } // --></script> </head> <body> <ul> <li><a href="http://www.openspc2.org:8080/index.html">OpenSpace</a> </ul> <div id="result"></div> </body> </html>
関連記事
スポンサーリンク