How to get the current web page URL using JQuery?

Can someone please explain me how to get the URL of the current web page of the user using JQuery?

Comments

  • You don't need to use JQuery. Simple JavaScript will do the trick.

    var currentURL= window.location.pathname;

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion