I am using jQuery. How do I get the path of the current URL and assign it to a variable?
Example URL:
Example URL:
http://localhost/menuname.de?foo=bar&number=0Solution:
To get the path, you can use:
var pathname = window.location.pathname;
No comments:
Post a Comment