Helpcenter +918010117117" [email protected]
B4,309-10 Spaze iTech Park, Sector 49, Sohna Road, 122001 Gurgaon India


The location object contains information about the current URL.


hashIt sets or returns the anchor part (#) of a URL.
hostIt sets or returns the host name and port number of a URL.
hostnameIt sets or returns the host name of a URL.
hrefIt sets or returns the entire URL.
originIt returns the protocol, host name and port number of a URL.
pathnameIt sets or returns the path name of a URL.
portIt sets or returns the port number of a URL.
protocolIt sets or returns the protocol of a URL.
searchIt sets or returns the query string part of a URL.


assignThis method loads a new document.
reloadThe method reloads the current document.
replaceIt replaces the current document with a new one.
absUrlIt returns the full URL representation with all segments encoded according to rules specified in RFC 3986.
pathThe method changes path when called with parameter.