-
Notifications
You must be signed in to change notification settings - Fork 39
/
Copy path39_navigation.js
27 lines (16 loc) · 1.17 KB
/
39_navigation.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// In JavaScript, the Navigation object provides information about the user's browsing history and allows you to manipulate the browser's history.
// Here are some commonly used properties and methods of the Navigation object in JavaScript:
// Navigation.back() : Navigates the browser back one page.
// Navigation.forward() : Navigates the browser forward one page.
// Navigation.go(num) : Navigates to a specific page in the browsing history, where num is a positive or negative integer.
// Navigation.reload() : Reloads the current page.
// Navigation.replace(url) : Replaces the current page with a new page, specified by the url parameter.
// Navigation.length : Returns the number of pages in the browsing history.
// Here is an example of how to use some of these Navigation object properties and methods in JavaScript:
// console.log(Navigation.length);
// Navigation.back();
// Navigation.forward();
// Navigation.go(-2);
// Navigation.reload();
// Navigation.replace("https://www.example.com");
// By using the Navigation object and its properties and methods, you can control the user's browsing experience and provide a more seamless navigation flow within your web application.