Well their are multiple ways through which we can get link of page we are on
some are
some are
- we can use
window.location.href
to get the complete URL. - And
window.location.pathname
to get URL leaving the host
see example here get the website url
through jquery we can access it using href attribute
$(location).attr('href');
Comments
Post a Comment