Answers for "how to get last part of url in javascript"

0

how to get last path from url in javascript

const lastSegmentOfUrl = this.href.substring(this.href.lastIndexOf('/') + 1);
Posted by: Guest on July-11-2021
-1

javascript get last url segment

console.log(this.href.substring(this.href.lastIndexOf('/') + 1));
Posted by: Guest on December-14-2020
-1

check last url in javascript

document.referrer
Posted by: Guest on June-21-2021

Code answers related to "how to get last part of url in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language