Posted By

brandonjp on 07/07/10


url javascript js location file textmate querystring query filename pathname

Versions (?)

Who likes this?

1 person have marked this snippet as a favorite


js variable for current url's filename

 / Published in: JavaScript

  1. // variable for the current filename in the URL
  2. var filename = location.pathname.substr(location.pathname.lastIndexOf("/") + 1, location.pathname.length);

Report this snippet  

You need to login to post a comment.