get last part of url jquery

Solutions on MaxInterview for get last part of url jquery by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "get last part of url jquery"
Violeta
27 Jan 2019
1// use this
2var part = [];
3var url = window.location.href;
4    part = (url.toString()).split('/') // this will give an array then choose your part by calling this array!! 
5// Hope this will help you!!!