Skip to content
Advertisement

Get the first part of a url path

If I have a url like:

http://localhost:53830/Organisations/1216/View

I want to alert the first part of the url path in lowercase format e.g. ‘organisations’

So far I have:

JavaScript

but it’s not working as intended. Can anyone help? Thanks

Advertisement

Answer

JavaScript
User contributions licensed under: CC BY-SA
6 People found this is helpful
Advertisement