Javascript : Get current url
Hello friends, if you want to have the URL address of a page in JavaScript you can use the following function: window.location.href Here is an example: Explanations: var pageURL = window.location.href : put the page URL in the variable. console.log(pageURL) : display the URL.