Skip to content

Instantly share code, notes, and snippets.

@alexbfree
Created November 3, 2022 20:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save alexbfree/dce0ec56d44a8267630543e838dcf544 to your computer and use it in GitHub Desktop.
Save alexbfree/dce0ec56d44a8267630543e838dcf544 to your computer and use it in GitHub Desktop.
yLEJegW
<!DOCTYPE html>
<html>
<body>
<h1>DelftStack learning</h1>
<h2>JavaScript get document referrer example</h2>
<p>We have arrived from this link : </p>
<p id="para"></p>
<script>
let refUrl = document.referrer // get referrer and storing in variable
document.getElementById("demo").innerHTML = refUrl; // assign value to paragraph
</script>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment