Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

how to get last path from url in javascript

const lastSegmentOfUrl = this.href.substring(this.href.lastIndexOf('/') + 1);
Comment

PREVIOUS NEXT
Code Example
Javascript :: first letter capital in jquery 
Javascript :: update create react app 
Javascript :: Composer could not find a composer.json file in To initialize a project, please create a composer.json file as described in the https://getcomposer.org/ "Getting Started" section 
Javascript :: authfunctions react 
Javascript :: javascript gcd 
Javascript :: decimal parse thousand separator javascript 
Javascript :: regular expression to remove empty lines after text 
Javascript :: addeventlistener hover js 
Javascript :: format money javascript commas 
Javascript :: document ready javascript vanilla 
Javascript :: showing difference between dates in minutes js 
Javascript :: mui typography bold 
Javascript :: angular npm angular material 
Javascript :: command to create react app 
Javascript :: js is empty object 
Javascript :: Select at random from array 
Javascript :: Could not resolve dependency: npm ERR! peer react@"17.0.1" from react-dom@17.0.1 
Javascript :: automatically scroll to bottom of page 
Javascript :: yarn create react app 
Javascript :: how to set json type jquery ajax 
Javascript :: get text selected option jquery 
Javascript :: get window width jquery 
Javascript :: get header height jquery 
Javascript :: jquery onscroll sticky header 
Javascript :: react aos 
Javascript :: js root url 
Javascript :: get radio button value javascript 
Javascript :: first child element javascript 
Javascript :: redirect in netlify react 
Javascript :: jquery disable select 
ADD CONTENT
Topic
Content
Source link
Name
3+9 =