JavaScript method to get the current page source page (that is the previous page)

  • 2020-05-26 07:44:24
  • OfStack

This example shows how JavaScript gets the current page source page (that is, the previous page). Share with you for your reference. The details are as follows:

The JS code below gets the source page address through document.referrer

<!DOCTYPE html>
The referrer of this document is:

I hope this article has been helpful to your javascript programming.

Related articles: