I'm doing a method in javascript
which given an absolute url makes it relative. For this I am trying to make a split
so that the url given the cut by \
I searched the internet and I am not able to find anything that works. How could I do it?
I have tried with the following, but it does not work and if I put only one \
it generates an error:
path.split("\");
var ultimo=path.lenght;
$('#url-archivo').val(path[ultimo-1]);