Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

split url javascript

const url = 'http://www.mymainsite.com/somepath/path2/path3/path4';
const pathname = new URL(url).pathname;
console.log(pathname);
 
PREVIOUS NEXT
Tagged: #split #url #javascript
ADD COMMENT
Topic
Name
1+5 =