I am already trying for over an hour and cant figure out the right way to do it, although it is probably pretty easy:
I have something like this : foo/bar/test
foo/bar/test
Try;
var str = "foo/bar/test.html"; var tmp = str.split("/"); alert(tmp.pop());