Siamnet
Home
...
Archives
Ajax
Bash
Java
JavaScript
jQuery
Linux
MySQL
Perl
PHP
SQLite
Ubuntu
Vi
Windows 7
All Pages
Wiki
Java Script-How To Get The Hostname From The Current Url
View
Edit
History
Print
How to get the hostname or http host from the current url
var
hostname
=
window.
location
.
hostname
[$[Get Code]]
Page Comments
(Click to edit)
[Click to add or edit comments])
Please prepend comments below including a date
Featured Pages
Login
February 2012
Sun
Mon
Tue
Wed
Thu
Fri
Sat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
2012-02-10
Design by
N.Design Studio
, adapted by
solidGone.org (version 1.0.0)
Have a nice day.