Suggest a feature
×

Welcome to TagMyCode

Please login or create account to add a snippet.
0
0
 
0
Language: Javascript
Posted by: userc865b
Added: May 29, 2018 12:27 PM
Views: 10
Tags: js
gets last Name after "/"
  1. var url = window.location.pathname;
  2. var filename = url.substring(url.lastIndexOf('/')+1);
  3. alert(filename);
  4.