location.href

se vuoi solo l'ultima parte

f = location.href.split("/")

nome = f[f.length-1];

ciao