Answers for "javascript get pathname of url"

8

javascript get url path

window.location.pathname
Posted by: Guest on June-06-2020
-1

js get path from url

var reg = /.+?\:\/\/.+?(\/.+?)(?:#|\?|$)/;
var pathname = reg.exec( 'http://www.somedomain.com/account/search?filter=a#top' )[1];
Posted by: Guest on April-29-2021

Code answers related to "javascript get pathname of url"

Code answers related to "Javascript"

Browse Popular Code Answers by Language