How To Get the Current URL in Javascript

Author: , September 6th, 2012

var pathname = window.location.pathname;

How To Get The Current Path, HREF, and Title Using jQuery

Author: , June 5th, 2011

Various Ways to Obtain Various Information: 1 2 3 4 5 jQuery(document).ready(function() {      var Path = window.location.pathname;      var HREF = jQuery(location).attr(’href’);      var Title = jQuery(this).attr(’title’); }); jQuery(document).ready(function() { var Path = window.location.pathname; var HREF = jQuery(location).attr(‘href’); var Title = jQuery(this).attr(‘title’); });