Get The Current URL in jQuery

In this post we will see how we can get the current URL in jQuery.<script>  

  1. $(document).ready(function ($) {  
  2.    alert(window.location);  
  3. });  
  4. </script>  

Here window.location will return the current location/url of your browser.

Please see my other posts related to JQuery here: JQuery Posts.