I need to check the URL
of a page in JavaScript. I'm displaying the following alert:
alert(window.location.href.toString())
The following ULR
is displayed in the alert:
http://localhost:9577/Painel/Index
I can not compare the entire string returned because the server will not always be localhost:9577
. How do I check only the /Painel/Index
directory regardless of the server?