Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- http://localhost/40ATV/dashboard.php?page_id=projeto_lista&lista_tipo=equipe
- dashboard.php?page_id=projeto_lista&lista_tipo=equipe
- //using a string variable set to the URL you want to pull info from
- //this could be set to `window.location.href` instead to get the current URL
- var strIn = 'http://localhost/40ATV/dashboard.php?page_id=projeto_lista&lista_tipo=equipe',
- //get the index of the start of the part of the URL we want to keep
- index = strIn.indexOf('/dashboard.php'),
- //then get everything after the found index
- strOut = strIn.substr(index);
- var a = "http://localhost/40ATV/dashboard.php?page_id=projeto_lista&lista_tipo=equipe";
- var cut = a.substr(22);
- document.write("/" + mySplitResult[mySplitResult.length - 1]);
- var str = "http://localhost/40ATV/dashboard.php?page_id=projeto_lista&lista_tipo=equipe";
- var arr_split = str.split("/");
- var num = arr_split.length-1;
- alert(arr_split[num]);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement