Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

javascript get filename from url

var filename = url.split('/').pop();
Comment

get filename from url js

var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1);
Comment

PREVIOUS NEXT
Code Example
Javascript :: jquery insert after 
Javascript :: react-redux imports 
Javascript :: js push if not exists 
Javascript :: username validation in javascript 
Javascript :: bar chart height and with change in chart.js 
Javascript :: javascript regex for firstname 
Javascript :: how to add double click event in javascript 
Javascript :: javascript copy text to clipboard 
Javascript :: javascript foreach get key and value 
Javascript :: es6 add and remove class 
Javascript :: if is array javascript 
Javascript :: firstElementChild jquery equivalent 
Javascript :: remove disabled attribute javascript 
Javascript :: js sync delay 
Javascript :: javascript display block 
Javascript :: parseint array javascript 
Javascript :: javascript change webpage title 
Javascript :: jquery add remove class clicked element 
Javascript :: track window size js 
Javascript :: on load hit click event js 
Javascript :: set autofocus javascript 
Javascript :: discord.js custom create channel 
Javascript :: javascript json foreach value 
Javascript :: create-react native app without expo 
Javascript :: read file with deno 
Javascript :: shuffle the array 
Javascript :: how to check nan in jquery 
Javascript :: event listener to elements with class 
Javascript :: react router dom 6 go back 
Javascript :: send a message when a bot joins your server discord.js 
ADD CONTENT
Topic
Content
Source link
Name
8+7 =