Alex Rivera | Logout

jquery, domain, get URL

Asked 2010-02-20T02:18:09.357
146

How can I get the domain name with jquery ??

Edit
Report

1 Answer

33

Similar to the answer before there there is

location.host

The location global has more fun facts about the current url as well. ( protocol, host, port, pathname, search, hash )

answered 2010-02-20T08:40:11.130

Your Answer