JavaScriptでホスト名を取得する方法

2010年05月13日

メモ

1
2
3
4
5
6
7
8
9
10
11
12
13
14
//ホスト名の取得
var xxx = location.host;

//ホストコンピュータ名の取得
var xxx = location.hostname;

//URLの取得
var xxx = location.href;

//プロトコルの取得
var xxx = location.protocol;

//ポート番号の取得
var xxx = location.port;

あんまり使わないけど、たまに使うのでメモ。

コメント:0件

  1. コメントはありません。
投稿者名
E-Mail

メールアドレスは公開いたしません
URL
コメント

トラックバック:1件

  1. [...] This post was mentioned on Twitter by のぶ. のぶ said: JavaScriptでホスト名を取得する方法 http://is.gd/c77eu [...]
    Tweets that mention JavaScriptでホスト名を取得する方法 | Director's Cut – art project team Blog - -- Topsy.com
ページのトップへ

artprojectteam & festiva Tweet

Loading..