JavaScript Window location.href
JavaScript Window location.href
The location.href property is used to either set or return the entire URL of the current page.
Syntax:-
Its syntax is:- location.href OR location.href = URL
Return:-
Its return is:- a string containning full URL of current Page
Further Explanation:-
Parameter | Description |
URL | A URL. It can be absolute URL, relative URL, anchor URL, or some protocols like ftp, mailto, file. |