js get hold of current page after / code example Example: get actual url in variable var currentLocation = window.location;