Home » javascript » Getting Current URL of web page

Getting Current URL of web page

Address bar shows current url if you want to access in javascript program then we use window.location.href

Syntax

Example:

Please follow and like us:
error