Location.href
Passing in a URL to location.href 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>
<script type="text/javascript">
location.href = "http://www.java2s.com";
</script>
</head>
<body>
</body>
</html>