9
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

JavascriptのURL情報取得方法まとめ

Last updated at Posted at 2017-01-26

ドメイン

domain.js
document.domain

ホスト名

hostname.js
window.location.hostname

ポート番号

port.js
window.location.port

ホスト名+ポート番号

host.js
window.location.host
9
16
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
9
16

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?