Home >Web Front-end >JS Tutorial >Several ways to implement page jumps in JavaScript
First type:
The explanation is followed directly by specifying the place to jump.Similar to a button, if the parameter is negative, it will go back a few times.
The third type:
window.navigate("index.jsp");
//navigate object contains information about the browser , can also be used as a page jump, and then directly add the place to jump.
// There is no public standard for navigator objects, but all browsers support this object./self refers to the current window object, which belongs to the top-level object of the window;
/ self The default is the URL address of the current window.
The fifth type:
alert("Illegal access!");
top.location= Index.jsp;
// Top attribute returns the top -level ancestor window.
//This property returns a read-only reference to a top-level window.
// If the window itself is a top-level window, the top attribute stores a reference to the window itself.
// If the window is a frame, then the top attribute refers to the top-level window containing the frame.