How To Get the Current URL in Javascript

var pathname = window.location.pathname;
![]() |
var pathname = window.location.pathname;
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'); }); |