Reputation:
For example, I am executing "index.html"
Something like this:
var filename = $.getFileName();
alert(filename);
Is it possible to get "index.html" as result in alert?
Upvotes: 0
Views: 87
Reputation: 2875
var name = window.location.href.substr(window.location.href.lastIndexOf("/")+1);
Upvotes: 1