get current filename from url


/ Published in: JavaScript
Save to your folder(s)



Copy this code and paste it in your HTML
  1. var url = "http://www.google.co.jp/index.html";
  2.  
  3. // You can use this script when URL includes a filename last,
  4. // for example CVS Viewer's URL
  5. url.split("/").pop();

URL: http://peperon299.blogspot.com/

Report this snippet


Comments


You need to login to view comments.