Easy Tutorial
❮ Prop Style Tablelayout Prop Audio Error ❯

History back() Method


Definition and Usage

The back() method loads the previous URL in the history list, if it exists.

Calling this method has the same effect as clicking the back button or calling history.go(-1).

Syntax


Browser Support

All major browsers support the back() method.


Example

Create a back button on a page:

The above example outputs:

function goBack() {
  window.history.back();
}

❮ Prop Style Tablelayout Prop Audio Error ❯