Javascript : Client Side Scripting :: Location Object
| Location Object | 
The following statements display the host name, the protocol name and the pathname of the URL displayed in the window,
document.write("File Path      :" +  location.pathname)
document.write("Protocol Used  :" +  location.protocol)
document.write("Host Name      :" +  location.hostname)
 
window.location.href = "http://www.javaskool.com/contact.html"
or
location.href = "http://www.javaskool.com/contact.html"
| Download Examples | 

 
																			 
																			 
																			
Recent Comments