javascript get filename from url
var filename = location.pathname.substr(location.pathname.lastIndexOf("/")+1);
var filename = url.split('/').pop();
Also in JavaScript:
- dustjs compilator
- javascript short syntax get element
- javascript combine objects
- jquery add multiple classes
- immediately invoked function expression
- copy an object with object.assign
- javascript round decimal 2 digits
- react native dropdown
- updating a key value on javascript object es6
- addclass removeclass jquery
- javascript date format mm/dd/yyyy
- javascript get filename from url
- ant design react
- oop js is
- reactjs start
- angular firebase
- mongodb js get id of inserted
- button click function in js
- how to check if a kendo drop down is enabled js
- javascript onclick open url same window
- react error boundary
- filereader javascript example
- jquery set checkbox checked
- testing objects for properties javascript