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:

Managed by MochaHost - Fast & Easy WordPress Hosting