how to get pgae apth in winsow.location.href code example Example: get actual url in variable var currentLocation = window.location;