window.location
Passing in a URL to window.location property starts the process of navigating to the new URL and makes an entry in the browser's history stack.
<!DOCTYPE HTML>
<html>
<head>
<title>Example</title>
</head>
<body>
<script type="text/javascript">
window.location = "http://www.java2s.com";
</script>
</body>
</html>
Home
JavaScript Book
DOM
JavaScript Book
DOM
Window:
- The Window Object
- The Window Events
- window.alert() or alert()
- window.close()
- window.confirm() or confirm()
- window.find() displays find dialog
- window's outer width and height, inner height and width
- window.location
- window.moveBy(distance, distance)
- window.moveTo(x,y) moves the window to the upper-left coordinate
- window.open()
- window.print()
- window.prompt() and prompt()
- window.resizeTo(x,y) and window.resizeBy(xDelta,yDelta)
- window.scrollTo(x,y)
- window.screenLeft, window.screenX, window.screenTop, window.screenY
- window.setInterval() or setInterval()
- window.setTimeout() or setTimeout()
- Pop-up Blockers