TOC PREV NEXT INDEX

Put your logo here!


window.location


Gets/sets the location, or current URL, of the window object.

Syntax

url = window.location 
window.location = url 

Parameters

url is a string containing the URL for the specified location.

Example

function getNews() { 
   window.location= "http://www.cnn.com"; 
} 
// in html: <button onclick="getNews();">News</button> 

Notes

None.

Specification

DOM Level 0. Not part of specification. 


mozilla.org | mailto:oeschger | bug 93108
TOC PREV NEXT INDEX