var str = "/asdasf/asfaewf/agaegr/trer/rhh";
var
str =
"/asdasf/asfaewf/agaegr/trer/rhh"
;
index = str .lastIndexOf(
"/"
);
str = str .substring(index + 1, str .length);
alert(str );