history object
history object
length: the number of historical records
go( n): "Forward" and "Backward" can be realized at the same time.
history.go(0) Refresh the web page
history.go(-1) Go back
history.go(1) Go one step forward
history.go(3) Go forward three Step
forward(): Equivalent to the browser's "forward" button
back(): Equivalent to Browser's "Back" button
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> </head> <body > <a href="//m.sbmmt.com">php中文网</a> <input type="button" value="前进一步" onclick="history.go(1)"> </body> </html>