What is the best way to get the Last segment of the URL (omitting any parameters). Also url may or may not include the last '/' character
for example
http://Home/Billing/Index.html?param1=2&another=2
should result in: Index.html
http://Home/Billing/Index.html/
should result in: Index.html
I've tried this but i can't get how to check for the last /
ar href = window.location.pathname;
var value = href.lastIndexOf('/') + 1);