Forum : Location Property in Java Script
Brief description  about Online courses   join in Online courses
View Sai Naren  Kondisetty 's Profile

Location Property in Java Script

Hi all,

Can any one explain me the location property in Java Script with a simple example.

Thanks,
Naren
Asked by Sai Naren Kondisetty | Nov 16, 2009 |  Reply now
Replies (2)
View sai-naren kondisetty 's Profile
Thanks alot...
Nov 17, 2009
View teacher siliconindia 's Profile
javascript location property is used for control the web page displayed by the browser.

properties of location object are: hash, host, href


The Location object contains information about the current URL.

location.hash will return value of the the #.
location.host is used for setting or returning host name.
location.href is used for set or return href.
Nov 17, 2009