• Wednesday , 26 November 2014
How to get current url in JavaScript and jQuery ?

How to get current url in JavaScript and jQuery ?

The window.location read-only property returns a Location object with information about the current location of the document.

we see all the property by this below Url

http://www.test.com:8082/index.php#tab2?foo=123
first  use window.location then write following property like

 

Or if you have jQuery you can do it like this:

 

Related Posts

  • http://joomlasticdeveloper.blogspot.in RonakParmar

    Hi, thanks for the explanation, its realy very helpful to me and all other like me who are new in jquery.
    Your code is simple to implement and the output of your code is also helpful to understand the code and i can identify which code is solve my issue.
    Thanks agian.

    • maddyzonetech

      its our pleasure that it is helpful for you.