How to get the current page url in javascript Posted on March 11, 2017 by admin use below method to get current url in javascript: var hrf = window.location; console.log(hrf);