home
~
projects
~
socials
Get The Current Domain Of A Web Page
HTML
<
div
id
=
"
exampleOutput
"
>
loading...
</
div
>
Output
https://www.alanwsmith.com
Notes
"origin" is the proper word instead of "domain", but I never remember that
-- end of line --
References
window: location property
Location object