How To Get The Current URL With JavaScript

preview_player
Показать описание
In this tutorial, you will learn how to get the URL with JavaScript of the current page.

Another good example of getting data from the JavaScript Window Object is when you need to find out the current URL the user is browsing to.

You might want to use this to build some relative links or possibly send this data to some back-end script (like analytics for example).

In the tutorial, we'll also take a look at how to parse a URL in JavaScript using the URL object constructor which will allow you to get the component parts of a URL. Channel Handle @codebubb
Рекомендации по теме
Комментарии
Автор

How could this be used to get an email address instead of the current URL? I would intend on using it in javascript to get the email address of the email recipient. The purpose would be to use that data to create my own unsubscribe me link instead of using a third party software. This would be just part of the code I would be using but I was wondering how I could focus that on the email address instead of the URL.

jrseven
Автор

How to get other subpages url of current website?

pratikdangol
visit shbcf.ru