How to get the current URL with JavaScript?
Answers
Answered by
0
(1) window.location.href returns the href (URL) of the current page.
(2) window.location.hostname returns the domain name of the web host.
(3) window.location.pathname returns the path and filename of the current page.
(4) window.location.protocol returns the web protocol used (http: or https:)
(5)window.location.assign loads a new document.
hope it help
mark as brainliest
(2) window.location.hostname returns the domain name of the web host.
(3) window.location.pathname returns the path and filename of the current page.
(4) window.location.protocol returns the web protocol used (http: or https:)
(5)window.location.assign loads a new document.
hope it help
mark as brainliest
Similar questions